#!/usr/bin/env sh
#
# Linux kernel configuration script
#

yconfig() {
	while [ $# -ne 0 ]; do
		./scripts/config --enable $1
		shift 1
	done
}

mconfig() {
	while [ $# -ne 0 ]; do
		./scripts/config --module $1
		shift 1
	done
}

nconfig() {
	while [ $# -ne 0 ]; do
		./scripts/config --disable $1
		shift 1
	done
}

varconfig() {
	FUONE="$1"
	FUTWO="$2"

	./scripts/config --set-val "$FUONE" "$FUTWO"
}

strconfig() {
	FUONE="$1"
	FUTWO="$2"

	./scripts/config --set-str "$FUONE" "$FUTWO"
}

main() {
	local arch flavor defconfig karch

	while getopts a:f:n opts; do
		case $opts in
			a) arch="$OPTARG" ;;
			f) flavor="$OPTARG" ;;
			n) export NODRIVERS="1" ;;
		esac
	done
	shift $((OPTIND - 1))

	case $arch in
		x86_64) defconfig="x86_64_defconfig" ;;
		i386) defconfig="i386_defconfig" ;;
		arm64)
			case $flavor in
				rpi4) defconfig="bcm2711_defconfig" ;;
				rpi3) defconfig="bcmrpi3_defconfig" ;;
				*) defconfig="defconfig" ;;
			esac
			;;
		arm)
			case $flavor in
				rpi2) defconfig="bcm2709_defconfig" ;;
				*) defconfig="vexpress_defconfig" ;;
			esac
			;;
		powerpc64le) defconfig="pseries_le_defconfig" ;;
		powerpc64)
			case $flavor in
				g5) defconfig="g5_defconfig" ;;
				ps3) defconfig="ps3_defconfig" ;;
				*) defconfig="pseries_defconfig" ;;
			esac
			;;
		riscv64) defconfig="defconfig" ;;
		*) echo "Architecture is not set or is not supported by Ataraxia GNU/Linux"; exit 1 ;;
	esac

	case $arch in
		x86_64) karch="x86_64" ;;
		i386) karch="i386" ;;
		arm64) karch="arm64" ;;
		arm) karch="arm" ;;
		powerpc64le|powerpc64) karch="powerpc" ;;
		riscv64) karch="riscv" ;;
		*) echo "Architecture is not set or is not supported by Ataraxia GNU/Linux"; exit 1 ;;
	esac

	make ARCH=$karch CC=${CROSS_COMPILE}clang $defconfig

	sed -i 's/=m/=y/g' .config

	yes '' | make ARCH=$karch CC=${CROSS_COMPILE}clang oldconfig

	case $arch in
		x86_64|i386)
			yconfig EFI EFI_STUB EFI_MIXED EFI_VARS FB_EFI EFI_RUNTIME_MAP EFIVAR_FS EFI_DISABLE_PCI_DMA \
				NUMA NUMA_BALANCING NUMA_BALANCING_DEFAULT_ENABLED AMD_NUMA NODES_SPAN_OTHER_NODES \
				NEED_MULTIPLE_NODES USE_PERCPU_NUMA_NODE_ID ACPI_NUMA MICROCODE MICROCODE_EARLY \
				MICROCODE_INTEL MICROCODE_AMD X86_PM_TIMER KVM_INTEL KVM_AMD KVM_AMD_SEV RCU_NOCB_CPU \
				GOOGLE_COREBOOT_TABLE FRAMEBUFFER_COREBOOT PINCTRL_AMD DMIID NITRO_ENCLAVES \
				HW_RANDOM_INTEL HW_RANDOM_AMD FB_HYPERV VBOXGUEST HYPERV HYPERV_UTILS HYPERV_MOUSE \
				HYPERV_NET HYPERV_BALLOON CPU_SUP_AMD LOCK_DOWN_IN_EFI_SECURE_BOOT AMD_MEM_ENCRYPT \
				HYPERV_IOMMU
			nconfig NUMA_EMU EFI_CUSTOM_SSDT_OVERLAYS
			varconfig NODES_SHIFT 6
			;;
		arm64)
			case $flavor in
				rpi4|rpi3) yconfig DMIID ;;
				*) yconfig DMIID EFI EFI_STUB EFI_MIXED EFI_VARS FB_EFI EFI_RUNTIME_MAP EFIVAR_FS EFI_DISABLE_PCI_DMA LOCK_DOWN_IN_EFI_SECURE_BOOT; nconfig EFI_CUSTOM_SSDT_OVERLAYS ;;
			esac
			;;
		arm)
			yconfig DMIID
			;;
		riscv64)
			yconfig EFI EFI_STUB EFI_MIXED EFI_VARS FB_EFI EFI_RUNTIME_MAP EFIVAR_FS EFI_DISABLE_PCI_DMA LOCK_DOWN_IN_EFI_SECURE_BOOT
			nconfig EFI_CUSTOM_SSDT_OVERLAYS
			;;
	esac

	# Core kernel
	yconfig KERNEL_ZSTD MODULES MODULE_SIG MODULE_SIG_SHA1 MODULE_UNLOAD MODULE_COMPRESS MODULE_COMPRESS_ZSTD \
		MODULE_SIG_FORCE RD_GZIP RD_BZIP2 RD_LZMA RD_XZ RD_LZO RD_LZ4 RD_ZSTD PREEMPT CC_OPTIMIZE_FOR_SIZE SLAB \
		STAGING TRIM_UNUSED_KSYMS
	nconfig KERNEL_GZIP MODULE_COMPRESS_GZIP CC_OPTIMIZE_FOR_PERFORMANCE
	strconfig MODULE_SIG_HASH "sha1"
	strconfig SYSTEM_TRUSTED_KEYS "certs/signing_key.pem"

	case $arch in
		x86_64|i386)
			if [ "$NODRIVERS" != "1" ]; then
				yconfig RAS
			fi
			;;
		powerpc64le|powerpc64)
			yconfig CC_OPTIMIZE_FOR_PERFORMANCE
			nconfig CC_OPTIMIZE_FOR_SIZE
			;;
	esac

	# Core features
	yconfig FW_LOADER EXPERT STAGING TMPFS DEVTMPFS DEVTMPFS_MOUNT UNIX SHMEM HZ_PERIODIC BINFMT_ELF BINFMT_SCRIPT \
		CGROUPS CGROUP_BPF CGROUP_CPUACCT CGROUP_FREEZER CGROUP_PIDS CGROUP_PERF CGROUP_HUGETLB CGROUP_NET_PRIO CGROUP_RDMA \
		CGROUP_NET_PRIO DNOTIFY INOTIFY_USER SIGNALFD TIMERFD EPOLL NET SYSFS PROC_FS FHANDLE BLK_DEV_BSG IPV6 AUTOFS4_FS \
		CGROUP_SCHED FAIR_GROUP_SCHED CFS_BANDWIDTH SCHEDSTATS SCHED_DEBUG FANOTIFY FANOTIFY_ACCESS_PERMISSIONS \
		SECCOMP SECCOMP_FILTER ANON_INODES BLOCK EVENTFD FSNOTIFY NET PACKET UNIX INET IPV6 NETDEVICES NLATTR NAMESPACES UTS_NS TIME_NS \
		IPC_NS USER_NS USER_NS_UNPRIVILEGED PID_NS NET_NS SYSVIPC ADVISE_SYSCALLS I2C_CHARDEV TMPFS_POSIX_ACL TMPFS_XATTR \
		FILE_LOCKING MANDATORY_FILE_LOCKING CPUSETS MEMCG KEYS BIG_KEYS KEY_DH_OPERATIONS PARTITION_ADVANCED EFI_PARTITION OSF_PARTITION \
		AMIGA_PARTITION SGI_PARTITION SUN_PARTITION KARMA_PARTITIO MAC_PARTITION AUDIT AUDITSYSCALL POSIX_MQUEUE MEMCG_SWAP MEMCG_SWAP_ENABLED \
		CFS_BANDWIDTH FAIR_GROUP_SCHED RT_GROUP_SCHED SCHED_AUTOGROUP QUOTA MAGIC_SYSRQ HW_RANDOM HW_RANDOM_VIRTIO WATCHDOG SMP \
		FRAMEBUFFER_CONSOLE FRAMEBUFFER_CONSOLE_DETECT_PRIMARY FRAMEBUFFER_CONSOLE_ROTATION FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER \
		HDMI SUSPEND BFQ_GROUP_IOSCHED PSTORE PSTORE_RAM PSTORE_ZSTD_COMPRESS PSTORE_ZSTD_COMPRESS_DEFAULT ZSMALLOC ZPOLL ZBUD \
		Z3FOLD ZSWAP ZSWAP_COMPRESSOR_DEFAULT_ZSTD ZSWAP_DEFAULT_ON ZSWAP_ZPOOL_DEFAULT_Z3FOLD SYSCALL_USER_DISPATCH NET_CLS_CGROUP \
		HW_RANDOM_TIMERIOMEM ENCRYPTED_KEYS TRUSTED_KEYS ZRAM PSTORE_ZONE PSTORE_BLK
	nconfig NO_HZ FW_LOADER_USER_HELPER SYSFS_DEPRECATED COMPAT_VDSO CGROUP_DEBUG FTRACE DYNAMIC_FTRACE PSTORE_CONSOLE KSM
	strconfig DEFAULT_HOSTNAME misaka
	strconfig LOCALVERSION -ataraxia
	strconfig UEVENT_HELPER_PATH ""
	strconfig EXTRA_FIRMWARE_DIR "/usr/lib/firmware"
	strconfig PSTORE_COMPRESS_DEFAULT "zstd"
	strconfig ZSWAP_COMPRESSOR_DEFAULT "zstd"
	varconfig HZ 300

	if [ "$NODRIVERS" != "1" ]; then
		# Error detection and correction (x86)
		case $arch in
			x86_64|i386)
				yconfig EDAC_ATOMIC_SCRUB EDAC_SUPPORT EDAC EDAC_LEGACY_SYSFS EDAC_GHES EDAC_DECODE_MCE EDAC_AMD64 EDAC_E752X \
					EDAC_I82975X EDAC_I3000 EDAC_I3200 EDAC_IE31200 EDAC_X38 EDAC_I5400 EDAC_I7CORE EDAC_I5000 EDAC_I5100 EDAC_I7300 \
					EDAC_SBRIDGE EDAC_SKX EDAC_I10NM EDAC_PND2
				nconfig EDAC_DEBUG EDAC_AMD64_ERROR_INJECTION
				;;
		esac

		# Hardware RNG
		yconfig HW_RANDOM_AMD HW_RANDOM_INTEL HW_RANDOM_TIMERIOMEM HW_RANDOM_TPM HW_RANDOM_VIA HW_RANDOM_VIRTIO HW_RANDOM_XIPHERA HW_RANDOM
	fi

	# Crypto
	yconfig CRYPTO CRYPTO_842 CRYPTO_ACOMP2 CRYPTO_AEAD CRYPTO_AEAD2 CRYPTO_AES CRYPTO_AKCIPHER CRYPTO_AKCIPHER2 CRYPTO_ALGAPI \
		CRYPTO_ALGAPI2 CRYPTO_ANUBIS CRYPTO_ARC4 CRYPTO_AUTHENC CRYPTO_BLKCIPHER CRYPTO_BLKCIPHER2 CRYPTO_BLOWFISH_COMMON \
		CRYPTO_BLOWFISH CRYPTO_CAMELLIA CRYPTO_CAST_COMMON CRYPTO_CAST5 CRYPTO_CAST6 CRYPTO_CBC CRYPTO_CCM CRYPTO_CRC32 \
		CRYPTO_CRC32C CRYPTO_CRCT10DIF CRYPTO_CRYPTD CRYPTO_CTR CRYPTO_CTS CRYPTO_DEFLATE CRYPTO_DES CRYPTO_DH CRYPTO_ECB \
		CRYPTO_ESSIV CRYPTO_FCRYPT CRYPTO_GCM CRYPTO_GF128MUL CRYPTO_GHASH CRYPTO_HASH CRYPTO_HASH2 CRYPTO_HMAC CRYPTO_KHAZAD \
		CRYPTO_KPP CRYPTO_KPP2 CRYPTO_LIB_AES CRYPTO_LIB_ARC4 CRYPTO_LIB_DES CRYPTO_LIB_SHA256 CRYPTO_LRW CRYPTO_LZO \
		CRYPTO_MANAGER_DISABLE_TESTS CRYPTO_MANAGER CRYPTO_MANAGER2 CRYPTO_MD4 CRYPTO_MD5 CRYPTO_MICHAEL_MIC CRYPTO_NULL \
		CRYPTO_NULL2 CRYPTO_PCBC CRYPTO_RMD160 CRYPTO_RNG_DEFAULT CRYPTO_RNG CRYPTO_RNG2 CRYPTO_RSA CRYPTO_SEED CRYPTO_SEQIV \
		CRYPTO_SERPENT CRYPTO_SHA1 CRYPTO_SHA256 CRYPTO_SHA512 CRYPTO_SIMD CRYPTO_TEA CRYPTO_TGR192 CRYPTO_TWOFISH_COMMON \
		CRYPTO_TWOFISH CRYPTO_WP512 CRYPTO_XTS CRYPTO_DRBG_MENU CRYPTO_DRBG_HMAC CRYPTO_DRBG_HASH CRYPTO_DRBG_CTR CRYPTO_DRBG \
		CRYPTO_JITTERENTROPY CRYPTO_HASH_INFO CRYPTO_ADIANTUM CRYPTO_AEGIS128 CRYPTO_AES_TI CRYPTO_CFB CRYPTO_CHACHA20 \
		CRYPTO_CHACHA20POLY1305 CRYPTO_CMAC CRYPTO_CRC32_PCLMUL CRYPTO_CRCT10DIF_PCLMUL CRYPTO_ECC CRYPTO_ECDH \
		CRYPTO_ECHAINIV CRYPTO_ECRDSA CRYPTO_ENGINE CRYPTO_KEYWRAP CRYPTO_LZ4 CRYPTO_LZ4HC CRYPTO_NHPOLY1305 \
		CRYPTO_OFB CRYPTO_PCRYPT CRYPTO_POLY1305 CRYPTO_RMD128 CRYPTO_RMD256 CRYPTO_RMD320 CRYPTO_SALSA20 CRYPTO_SHA3 \
		CRYPTO_SM3 CRYPTO_SM4 CRYPTO_STREEBOG CRYPTO_USER CRYPTO_VMAC CRYPTO_XCBC CRYPTO_XXHASH CRYPTO_ZSTD \
		CRYPTO_CURVE25519 CRYPTO_SM2 CRYPTO_ANSI_CPRNG CRYPTO_USER_API CRYPTO_USER_API_HASH CRYPTO_USER_API_SKCIPHER \
		CRYPTO_USER_API_RNG CRYPTO_USER_API_AEAD CRYPTO_BLAKE2S PKCS8_PRIVATE_KEY_PARSER
	nconfig CRYPTO_STATS

	# Platform specific crypto
	case $arch in
		x86_64|i386)
			yconfig CRYPTO_AES_NI_INTEL CRYPTO_CRC32C_INTEL CRYPTO_GLUE_HELPER_X86 CRYPTO_GHASH_CLMUL_NI_INTEL \
				CRYPTO_BLAKE2S_X86 CRYPTO_DEV_CCP CRYPTO_DEV_QAT_DH895xCC CRYPTO_DEV_QAT_C3XXX CRYPTO_DEV_QAT_C62X \
				CRYPTO_DEV_QAT_4XXX CRYPTO_DEV_QAT_DH895xCCVF CRYPTO_DEV_QAT_C3XXXVF CRYPTO_DEV_QAT_C62XVF CRYPTO_DEV_CCP \
				CRYPTO_DEV_CCP_DD CRYPTO_DEV_SP_CCP CRYPTO_DEV_CCP_CRYPTO
			;;
	esac
	case $arch in
		x86_64)
			yconfig CRYPTO_TWOFISH_X86_64 CRYPTO_CAMELLIA_X86_64 CRYPTO_SERPENT_SSE2_X86_64 \
				CRYPTO_TWOFISH_AVX_X86_64 CRYPTO_SERPENT_AVX_X86_64 CRYPTO_SERPENT_AVX2_X86_64 \
				CRYPTO_CAMELLIA_AESNI_AVX_X86_64 CRYPTO_CAMELLIA_AESNI_AVX2_X86_64 CRYPTO_CAST5_AVX_X86_64 \
				CRYPTO_CAST6_AVX_X86_64 CRYPTO_SHA1_SSSE3 CRYPTO_SHA256_SSSE3 CRYPTO_SHA512_SSSE3 \
				CRYPTO_NHPOLY1305_SSE2 CRYPTO_AEGIS128_AESNI_SSE2 CRYPTO_TWOFISH_X86_64_3WAY CRYPTO_POLY1305_X86_64 \
				CRYPTO_DES3_EDE_X86_64 CRYPTO_CHACHA20_X86_64 CRYPTO_BLOWFISH_X86_64 CRYPTO_CURVE25519_X86 \
				CRYPTO_NHPOLY1305_AVX2
			;;
		arm64)
			yconfig ARM64_CRYPTO CRYPTO_SHA256_ARM64 CRYPTO_SHA512_ARM64 CRYPTO_SHA1_ARM64_CE CRYPTO_SHA2_ARM64_CE \
				CRYPTO_GHASH_ARM64_CE CRYPTO_AES_ARM64 CRYPTO_AES_ARM64_CE CRYPTO_AES_ARM64_CE_CCM CRYPTO_AES_ARM64_CE_BLK \
				CRYPTO_AES_ARM64_NEON_BLK CRYPTO_SHA512_ARM64_CE CRYPTO_SHA3_ARM64 CRYPTO_SM3_ARM64_CE CRYPTO_SM4_ARM64_CE \
				CRYPTO_CRCT10DIF_ARM64_CE CRYPTO_CHACHA20_NEON CRYPTO_POLY1305_NEON CRYPTO_NHPOLY1305_NEON CRYPTO_AES_ARM64_BS \
				CRYPTO_DEV_PADLOCK CRYPTO_DEV_CCP CRYPTO_DEV_CCP_DD CRYPTO_DEV_SP_CCP CRYPTO_DEV_CCP_CRYPTO
			nconfig CRYPTO_AEGIS128_SIMD
			;;
		arm)
			yconfig ARM_CRYPTO CRYPTO_SHA1_ARM CRYPTO_SHA256_ARM CRYPTO_SHA512_ARM CRYPTO_AES_ARM CRYPTO_AES_ARM_CE \
				CRYPTO_GHASH_ARM_CE CRYPTO_CRCT10DIF_ARM_CE CRYPTO_CRC32_ARM_CE CRYPTO_DEV_PADLOCK
			nconfig CRYPTO_AEGIS128_SIMD
			;;
	esac

	# Filesystems support
	yconfig NETWORK_FILESYSTEMS GENERIC_ACL FS_POSIX_ACL FS_ENCRYPTION FS_ENCRYPTION_INLINE_CRYPT EXPORTFS FSCACHE FSCACHE_STATS \
		LOCKD FUSE_FS EXT4_FS EXT4_USE_FOR_EXT2 ZONEFS_FS EXT4_FS_POSIX_ACL EXT4_FS_SECURITY BTRFS_FS BTRFS_FS_POSIX_ACL XFS_FS \
		XFS_POSIX_ACL XFS_QUOTA F2FS_FS F2FS_STAT_FS F2FS_FS_XATTR F2FS_FS_POSIX_ACL F2FS_FS_SECURITY F2FS_CHECK_FS F2FS_FS_COMPRESSION \
		F2FS_FS_LZO F2FS_FS_LZ4 F2FS_FS_ZSTD F2FS_FS_LZORLE CEPH_FS CEPH_FSCACHE CEPH_FS_POSIX_ACL CEPH_LIB_USE_DNS_RESOLVER CIFS_DFS_UPCALL \
		CIFS_FSCACHE CIFS CIFS_POSIX CIFS_STATS2 CIFS_UPCALL CIFS_WEAK_PW_HASH CIFS_XATTR CIFS_SMB2 CIFS_SMB311 9P_FS 9P_FSCACHE 9P_FS_POSIX_ACL \
		9P_FS_SECURITY ISO9660_FS NTFS_FS NTFS_RW FAT_FS MSDOS_FS UDF_FS VFAT_FS EXFAT_FS OVERLAY_FS FAT_DEFAULT_UTF8 MISC_FILESYSTEMS \
		NLS NLS_CODEPAGE_437 NLS_ASCII NLS_ISO8859_1 NLS_UTF8 JOLIET SQUASHFS SQUASHFS_FILE_DIRECT SQUASHFS_DECOMP_MULTI SQUASHFS_XATTR SQUASHFS_ZLIB \
		SQUASHFS_LZ4 SQUASHFS_LZO SQUASHFS_XZ SQUASHFS_ZSTD GRACE_PERIOD LOCKD_V4 NFS_FS NFS_V4 NFSD NFS_COMMON NFS_FSCACHE NFS_SWAP \
		NFS_USE_KERNEL_DNS NFS_V2 NFS_V3_ACL NFS_V3 NFS_V4_1_MIGRATION NFS_V4_1 NFS_V4_2 NFSD_V3_ACL NFSD_V4 PNFS_FILE_LAYOUT \
		ROOT_NFS SUNRPC SUNRPC_XPRT_RDMA SUNRPC_BACKCHANNEL SUNRPC_GSS SUNRPC_SWAP PNFS_FLEXFILE_LAYOU RPCSEC_GSS_KRB5
	nconfig SQUASHFS_FILE_CACHE SQUASHFS_DECOMP_SINGLE SQUASHFS_DECOMP_MULTI_PERCPU SQUASHFS_4K_DEVBLK_SIZE SQUASHFS_EMBEDDED \
		F2FS_IO_TRACE F2FS_FAULT_INJECTION
	varconfig FAT_DEFAULT_CODEPAGE 437
	varconfig SQUASHFS_FRAGMENT_CACHE_SIZE 3
	strconfig EXFAT_DEFAULT_IOCHARSET "ascii"
	strconfig FAT_DEFAULT_IOCHARSET "ascii"
	strconfig NLS_DEFAULT "utf8"
	strconfig NFS_V4_1_IMPLEMENTATION_ID_DOMAIN "kernel.org"

	# Block devices
	yconfig BLK_CGROUP BLK_DEV_3W_XXXX_RAID BLK_DEV_DRBD BLK_DEV_INITRD BLK_DEV_LOOP BLK_DEV_NBD BLK_DEV_NVME \
		BLK_DEV_PCIESSD_MTIP32XX BLK_DEV_RAM BLK_DEV_RBD BLK_DEV_SD BLK_DEV_SR BLK_DEV_THROTTLING BLK_WBT \
		BLK_DEV_INTEGRITY BLK_DEV_ZONED SCSI_LOWLEVEL BLK_MQ_PCI BLK_MQ_VIRTIO BLK_MQ_RDMA BLK_PM

	# LVM, ISCSI, MDADM
	yconfig MD BLK_DEV_DM BLK_DEV_MD DM_DEBUG_BLOCK_MANAGER_LOCKING DM_CRYPT DM_MIRROR DM_INIT DM_UEVENT DM_VERITY DM_VERITY_FEC \
		DM_INTEGRITY DM_BUFIO DM_BIO_PRISON DM_PERSISTENT_DATA DM_UNSTRIPED DM_SNAPSHOT DM_THIN_PROVISIONING DM_CACHE DM_CACHE_SMQ \
		DM_ERA DM_LOG_USERSPACE DM_RAID DM_ZERO DM_MULTIPATH DM_MULTIPATH_QL DM_MULTIPATH_ST DM_MULTIPATH_IOA DM_DUST DM_FLAKEY \
		DM_SWITCH DM_LOG_WRITES DM_ZONED MD_LINEAR MD_RAID0 MD_RAID1 MD_RAID10 MD_RAID456 FUSION FUSION_SPI FUSION_FC FUSION_SAS \
		FUSION_CTL FUSION_LAN ISCSI_BOOT_SYSFS SCSI_TARGET ISCSI_TCP SCSI_ISCSI_ATTRS TCM_IBLOCK TCM_FILEIO MD_FAULTY MD_CLUSTER \
		LOOPBACK_TARGET BCACHE
	nconfig DM_DEBUG
	varconfig FUSION_MAX_SGE 128

	if [ "$NODRIVERS" != "1" ]; then
		# SCSI
		yconfig SCSI SCSI_DMA SCSI_MULTI_LUN SCSI_MOD RAID_ATTRSSCSI_NETLINK SCSI_PROC_FS SCSI_LOWLEVEL SCSI_DPT_I2O SCSI_ARCMSR \
			MEGARAID_NEWGEN MEGARAID_MM MEGARAID_MAILBOX MEGARAID_SAS SCSI_MPT3SAS SCSI_MPT2SAS SCSI_UFS_BSG SCSI_HPTIOP SCSI_BUSLOGIC SCSI_FLASHPOINT \
			SCSI_HPSA SCSI_3W_9XXX SCSI_3W_SAS SCSI_ACARD SCSI_AHA1740 SCSI_AACRAID SCSI_AIC7XXX SCSI_AIC79XX CONFIG_LIBFC LIBFCOE FCOE \
			FCOE_FNIC SCSI_DH SCSI_SYM53C8XX_MMIO SCSI_IPR SCSI_SYM53C8XX_2 SCSI_GDTH SCSI_ISCI SCSI_IPS SCSI_INITIO SCSI_INIA100 SCSI_DMX3191D \
			SCSI_SCAN_ASYNC SCSI_STEX SCSI_ENCLOSURE SCSI_BNX2X_FCOE BE2ISCSI SCSI_MVSAS ESAS2R SCSI_UFSHCD SCSI_UFSHCD_PCI SCSI_UFS_DWC_TC_PCI \
			SCSI_UFSHCD_PLATFORM SCSI_UFS_CDNS_PLATFORM SCSI_UFS_DWC_TC_PLATFORM SCSI_MYRB SCSI_MYRS MEGARAID_LEGACY SCSI_ESAS2R SCSI_MVUMI \
			SCSI_CXGB3_ISCSI SCSI_CXGB4_ISCSI SCSI_BNX2_ISCSI SCSI_PPA SCSI_IMM SCSI_QLA_FC SCSI_QLA_ISCSI QEDI QEDF SCSI_SIM710 SCSI_DC395X \
			SCSI_AM53C974 SCSI_VIRTIO SCSI_CHELSIO_FCOE SCSI_DH_RDAC SCSI_DH_HP_SW SCSI_DH_EMC SCSI_DH_ALUA
		mconfig TCM_QLA2XXX SCSI_PM8001 SCSI_ADVANSYS SCSI_AIC94XX SCSI_LPFC SCSI_QLOGIC_1280 SCSI_BFA_FC SCSI_WD719X SCSI_SMARTPQI
		nconfig SCSI_CONSTANTS SCSI_LOGGING AIC94XX_DEBUG SCSI_MVSAS_DEBUG SCSI_MVSAS_TASKLET AIC79XX_REG_PRETTY_PRINT AIC79XX_DEBUG_ENABLE \
			AIC7XXX_REG_PRETTY_PRINT AIC7XXX_DEBUG_ENABLE SCSI_LPFC_DEBUG_FS TCM_QLA2XXX_DEBUG SCSI_IZIP_EPP16 SCSI_IZIP_SLOW_CTR SCSI_IPR_TRACE \
			SCSI_IPR_DUMP SCSI_SNIC_DEBUG_FS SCSI_FDOMAIN_PCI SCSI_DEBUG
		varconfig AIC79XX_CMDS_PER_DEVICE 32
		varconfig AIC79XX_RESET_DELAY_MS 5000
		varconfig AIC79XX_DEBUG_MASK 0
		varconfig AIC7XXX_CMDS_PER_DEVICE 32
		varconfig AIC7XXX_RESET_DELAY_MS 5000
		varconfig AIC7XXX_DEBUG_MASK 0
		varconfig SCSI_MPT2SAS_MAX_SGE 128
		varconfig SCSI_MPT3SAS_MAX_SGE 128
		varconfig SCSI_SYM53C8XX_DMA_ADDRESSING_MODE 1
		varconfig SCSI_SYM53C8XX_DEFAULT_TAGS 16
		varconfig SCSI_SYM53C8XX_MAX_TAGS 64

		# Platform specific SCSI
		case $arch in
			x86_64|i386)
				yconfig VMWARE_PVSCSI XEN_SCSI_FRONTEND HYPERV_STORAGE
				;;
		esac
	fi

	# ATA
	yconfig ATA ATA_VERBOSE_ERROR ATA_ACPI ATA_SFF ATA_BMDMA ATA_PIIX ATA_GENERIC

	# SATA
	yconfig SATA_PMP SATA_AHCI SATA_AHCI_PLATFORM SATA_INIC162X SATA_ACARD_AHCI SATA_SIL24 PDC_ADMA SATA_QSTOR \
		SATA_SX4 SATA_MV SATA_NV SATA_PROMISE SATA_SIL SATA_SIS SATA_SVW SATA_ULI SATA_VIA SATA_VITESSE
	nconfig SATA_ZPODD SATA_DWC
	varconfig SATA_MOBILE_LPM_POLICY 3

	# NVME
	yconfig NVME_CORE NVME_MULTIPATH NVME_FABRICS NVME_RDMA NVME_FC NVME_TCP NVME_TARGET NVME_TARGET_LOOP NVME_TARGET_RDMA NVME_TARGET_FC \
		NVME_TARGET_FCLOOP NVME_TARGET_TCP

	# SHDCI
	yconfig MMC MMC_SDHCI MMC_SDHCI_PCI MMC_SDHCI_ACPI MMC_SDHCI_PLTFM MMC_RICOH_MMC MMC_SDHCI_IO_ACCESSORS MMC_REALTEK_PCI MMC_REALTEK_USB MMC_CQHCI MMC_TOSHIBA_PCI \
		MMC_MTK MMC_SDHCI_XENON MMC_TIFM_SD MMC_SPI MMC_SDRICOH_CS MMC_CB710 MMC_VIA_SDMMC MMC_SDHCI_F_SDH30 MMC_WBSD MMC_ALCOR MMC_VUB300 MMC_USHC MMC_USDHI6ROL0 \
		MEMSTICK
	nconfig MEMSTICK_DEBUG

	# Platform specific SDHCI
	case $arch in
		arm64|arm)
			yconfig MMC_ARMMMCI MMC_QCOM_DML MMC_SDHCI_OF_ASPEED MMC_SDHCI_OF_AT91 MMC_SDHCI_CADENCE MMC_SDHCI_ESDHC_IMX \
				MMC_SDHCI_TEGRA MMC_SDHCI_PXAV3 MMC_SDHCI_F_SDH30 MMC_SUNXI MMC_DW MMC_DW_PLTFM MMC_DW_EXYNOS MMC_DW_K3 MMC_DW_PCI MMC_DW_ROCKCHIP
			nconfig MMC_DW_BLUEFIELD MMC_DW_HI3798CV200
			;;
	esac

	# Deprecated storage support
	nconfig PCMCIA PATA_TIMINGS PATA_AMD PATA_OLDPIIX PATA_SCH PATA_SIS

	# USB
	yconfig USB_UAS USB_SUPPORT USB_COMMON USB_ARCH_HAS_HCD USB USB_ANNOUNCE_NEW_DEVICES \
		USB_C67X00_HCD USB_XHCI_HCD USB_XHCI_DBGCAP USB_XHCI_PCI USB_XHCI_PLATFORM USB_EHCI_HCD USB_EHCI_ROOT_HUB_TT \
		USB_EHCI_TT_NEWSCHED USB_EHCI_PCI USB_EHCI_HCD_PLATFORM USB_OXU210HP_HCD USB_ISP116X_HCD USB_FOTG210_HCD USB_OHCI_HCD \
		USB_OHCI_HCD_PCI USB_OHCI_HCD_SSB USB_OHCI_HCD_PLATFORM USB_UHCI_HCD USB_U132_HCD USB_SL811_HCD USB_SL811_CS USB_R8A66597_HCD \
		USB_WHCI_HCD USB_HWA_HCD USB_HCD_SSB USB_DWCOTG USB_PHY USB_MXS_PHY AMLOGIC_USB USB_DWC_OTG_HCD \
		USB_HOST_ELECT_TEST USB_DEFAULT_PERSIST UCSI MFD_RTSX_USB MMC_REALTEK_USB MEMSTICK_REALTEK_USB USB_MASS_STORAGE \
		U_SERIAL_CONSOLE USB_GADGET MEDIA_USB_SUPPORT INTEL_ISH_HID USB_OHCI_LITTLE_ENDIAN USB_SUPPORT USB_COMMON \
		USB_ARCH_HAS_HCD USB_PCI USB_DEFAULT_PERSIST USB_OTG USB_LEDS_TRIGGER_USBPORT USB_MON USB_WUSB USB_WUSB_CBAF \
		USB_CDNS3 USB_CDNS3_PCI_WRAP USB_CDNS3_GADGET USB_CDNS3_HOST USB4 USB_G_SERIAL USB_PRINTER USB4_NET
	nconfig USB_ACM USB_MON USB_HCD_TEST_MODE USB_HCD_BCMA USB_SL811_HCD_ISO USB_WUSB_CBAF_DEBUG \
		USB_OTG_WHITELIST USB_OTG_BLACKLIST_HUB USB_OTG_FSM USB_DYNAMIC_MINORS

	if [ "$NODRIVERS" != "1" ]; then
		# USB storage drivers
		yconfig USB_STORAGE REALTEK_AUTOPM USB_STORAGE_REALTEK REALTEK_AUTOPM USB_STORAGE_DATAFAB \
			USB_STORAGE_FREECOM USB_STORAGE_ISD200 USB_STORAGE_USBAT USB_STORAGE_SDDR09 USB_STORAGE_SDDR55 \
			USB_STORAGE_JUMPSHOT USB_STORAGE_ALAUDA USB_STORAGE_ONETOUCH USB_STORAGE_KARMA USB_STORAGE_CYPRESS_ATACB \
			USB_STORAGE_ENE_UB6250

		# USB serial drivers
		yconfig USB_USS720 USB_SERIAL  USB_SERIAL_SIMPLE USB_SERIAL_AIRCABLE USB_SERIAL_ARK3116 USB_SERIAL_BELKIN \
			USB_SERIAL_CH341 USB_SERIAL_WHITEHEAT USB_SERIAL_DIGI_ACCELEPORT USB_SERIAL_CP210X USB_SERIAL_CYPRESS_M8 \
			USB_SERIAL_EMPEG USB_SERIAL_FTDI_SIO USB_SERIAL_VISOR USB_SERIAL_IPAQ USB_SERIAL_IR USB_SERIAL_EDGEPORT \
			USB_SERIAL_EDGEPORT_TI USB_SERIAL_F81232 USB_SERIAL_F8153X USB_SERIAL_GARMIN USB_SERIAL_IPW USB_SERIAL_IUU \
			USB_SERIAL_KEYSPAN_PDA USB_SERIAL_KEYSPAN USB_SERIAL_KLSI USB_SERIAL_KOBIL_SCT USB_SERIAL_MCT_U232 \
			USB_SERIAL_METRO USB_SERIAL_MOS7720  USB_SERIAL_MOS7840 USB_SERIAL_MXUPORT USB_SERIAL_CONSOLE \
			USB_SERIAL_NAVMAN USB_SERIAL_PL2303 USB_SERIAL_OTI6858 USB_SERIAL_QCAUX USB_SERIAL_QUALCOMM \
			USB_SERIAL_SPCP8X5 USB_SERIAL_SAFE USB_SERIAL_SIERRAWIRELESS USB_SERIAL_SYMBO USB_SERIAL_TI \
			USB_SERIAL_CYBERJACK USB_SERIAL_XIRCOM USB_SERIAL_WWAN USB_SERIAL_OPTION USB_SERIAL_OMNINET \
			USB_SERIAL_OPTICON USB_SERIAL_XSENS_MT USB_SERIAL_WISHBONE USB_SERIAL_SSU100 USB_SERIAL_QT2 \
			USB_SERIAL_UPD78F0730 USB_SERIAL_XR
		nconfig USB_SERIAL_DEBUG

		# USB misc
		yconfig USB_EMI62 USB_EMI26 USB_ADUTUX USB_SEVSEG USB_RIO500 _USB_LEGOTOWER USB_LCD USB_CYPRESS_CY7C63 USB_CYTHERM USB_IDMOUSE \
			USB_FTDI_ELAN USB_APPLEDISPLAY USB_SISUSBVGA  USB_LD USB_TRANCEVIBRATOR USB_IOWARRIOR USB_ISIGHTFW USB_YUREX USB_EZUSB_FX2 \
			USB_HUB_USB251XB USB_HSIC_USB3503 USB_HSIC_USB4604 USB_CHAOSKEY USB_ATM USB_SPEEDTOUCH USB_CXACRU USB_UEAGLEATM USB_XUSBATM \
			SB_GR_UDC USB_R8A66597 USB_PXA27X USB_MV_UDC USB_MV_U3D USB_SNP_CORE USB_SNP_UDC_PLAT USB_M66592 \
			USB_BDC_UDC USB_BDC_PCI USB_AMD5536UDC USB_GOKU USB_NET_AQC111 USB_NET_AX88179_178A USB_NET_AX8817X \
			USB_NET_CDC_EEM USB_NET_CDC_MBIM USB_NET_CDC_NCM USB_NET_CDC_SUBSET USB_NET_CH9200 USB_NET_CX82310_ETH \
			USB_NET_DM9601 USB_NET_DRIVERS USB_NET_GL620A USB_NET_HUAWEI_CDC_NCM USB_NET_INT51X1 USB_NET_KALMIA \
			USB_NET_MCS7830 USB_NET_NET1080 USB_NET_PLUSB USB_NET_QMI_WWAN USB_NET_RNDIS_HOST USB_NET_RNDIS_WLAN \
			USB_NET_SMSC75XX USB_NET_SMSC95XX USB_NET_SR9700 USB_EG20T USB_GADGET_XILINX USB_LIBCOMPOSITE \
			USB_F_ACM USB_F_SS_LB USB_U_SERIAL USB_U_ETHER USB_U_AUDIO USB_F_SERIAL USB_F_OBEX USB_F_NCM USB_F_ECM \
			USB_F_PHONET USB_F_EEM USB_F_SUBSET USB_F_RNDIS USB_F_MASS_STORAGE USB_F_FS USB_F_UAC1 USB_F_UAC1_LEGACY \
			USB_F_UAC2 USB_F_UVC USB_F_MIDI USB_F_HID USB_F_PRINTER USB_F_TCM USB_CONFIGFS USB_ZERO USB_AUDIO USB_ETH \
			USB_G_NCM USB_GADGETFS USB_FUNCTIONFS USB_MASS_STORAGE USB_GADGET_TARGET USB_G_SERIAL USB_MIDI_GADGET USB_G_PRINTER \
			USB_CDC_COMPOSITE USB_G_NOKIA USB_G_ACM_MS USB_G_MULTI USB_G_MULTI_RNDIS USB_G_HID USB_G_DBGP USB_G_WEBCAM \
			UCSI_CCG UCSI_ACPI USB_ROLES_INTEL_XHCI USB_ULPI_BUS UWB UWB_HWA UWB_WHCI UWB_I1480U PWRSEQ_EMMC \
			PWRSEQ_SD8787 PWRSEQ_SIMPLE USB_MDC800 USB_MICROTEK USBIP_CORE USB_MUSB_HDRC USB_DWC3 USB_DWC2 \
			USB_CHIPIDEA USB_ISP1760 FB_UDL USB_CONFIGFS_SERIAL USB_CONFIGFS_ACM USB_CONFIGFS_OBEX USB_CONFIGFS_NCM \
			USB_CONFIGFS_ECM USB_CONFIGFS_ECM_SUBSET USB_CONFIGFS_RNDIS USB_CONFIGFS_EEM USB_CONFIGFS_PHONET \
			USB_CONFIGFS_MASS_STORAGE USB_CONFIGFS_F_LB_SS USB_CONFIGFS_F_FS USB_CONFIGFS_F_UAC1 \
			USB_CONFIGFS_F_UAC1_LEGACY USB_CONFIGFS_F_UAC2 USB_CONFIGFS_F_MIDI USB_CONFIGFS_F_HID \
			USB_CONFIGFS_F_UVC USB_CONFIGFS_F_PRINTER USB_CONFIGFS_F_TCM USB_ROLE_SWITCH USB_LED_TRIG \
			USB_SERIAL_GENERIC USB_SERIAL_MOS7715_PARPORT USB_SISUSBVGA_CON USB_ETH_RNDIS \
			USB_ETH_EEM USB_FUNCTIONFS_ETH USB_FUNCTIONFS_RNDIS USB_FUNCTIONFS_GENERIC USB_G_MULTI_RNDIS \
			USB_G_MULTI_CDC USB_G_DBGP_SERIAL USB_USBNET
		nconfig USB_G_DBGP_PRINTK GADGET_UAC1 USB_GADGET_UAC1 USBIP_DEBUG USB_TEST USB_DUMMY_HCD
	fi

	# TypeC support
	yconfig TYPEC TYPEC_TCPM TYPEC_TCPCI TYPEC_RT1711H TYPEC_FUSB302 TYPEC_WCOVE TYPEC_UCSI UCSI_CCG UCSI_ACPI \
		TYPEC_TPS6598X TYPEC_MUX_PI3USB30532 TYPEC_DP_ALTMODE TYPEC_NVIDIA_ALTMODE TYPEC_STUSB160X \
		TYPEC_HD3SS3220

	# Disable IEEE 1394 support everywhere but PowerPC
	case $arch in
		powerpc64|powerpc)
			yconfig MACINTOSH_DRIVERS FIREWIRE FIREWIRE_OHCI FIREWIRE_SBP2 FIREWIRE_NET FIREWIRE_NOSY
			;;
		*)
			nconfig FIREWIRE
			;;
	esac


	# Basic input support
	yconfig INPUT_KEYBOARD INPUT_MOUSE INPUT_EVDEV INPUT_MISC INPUT_UINPUT MOUSE_PS2_ALPS \
		KEYBOARD_ADC KEYBOARD_ADP5520 KEYBOARD_ADP5588 KEYBOARD_ADP5589 KEYBOARD_APPLESPI \
		KEYBOARD_ATKBD KEYBOARD_QT1050 KEYBOARD_QT1070 KEYBOARD_QT2160 KEYBOARD_DLINK_DIR685 \
		KEYBOARD_LKKBD KEYBOARD_GPIO KEYBOARD_GPIO_POLLED KEYBOARD_TCA6416 KEYBOARD_TCA8418 \
		KEYBOARD_MATRIX KEYBOARD_LM8323 KEYBOARD_LM8333 KEYBOARD_MAX7359 KEYBOARD_MCS \
		KEYBOARD_MPR121 KEYBOARD_NEWTON KEYBOARD_OPENCORES KEYBOARD_SAMSUNG KEYBOARD_STOWAWAY \
		KEYBOARD_SUNKBD KEYBOARD_STMPE KEYBOARD_IQS62X KEYBOARD_OMAP4 KEYBOARD_TC3589X \
		KEYBOARD_TM2_TOUCHKEY KEYBOARD_TWL4030 KEYBOARD_XTKBD KEYBOARD_CROS_EC KEYBOARD_CAP11XX \
		KEYBOARD_BCM KEYBOARD_MTK_PMIC VIRTIO_INPUT MOUSE_PS2_BYD MOUSE_PS2_LOGIPS2PP \
		MOUSE_PS2_SYNAPTICS MOUSE_PS2_SYNAPTICS_SMBUS MOUSE_PS2_CYPRESS MOUSE_PS2_LIFEBOOK \
		MOUSE_PS2_TRACKPOINT MOUSE_PS2_ELANTECH MOUSE_PS2_ELANTECH_SMBUS MOUSE_PS2_SENTELIC \
		MOUSE_PS2_TOUCHKIT MOUSE_PS2_FOCALTECH MOUSE_PS2_VMMOUSE MOUSE_PS2_SMBUS MOUSE_ELAN_I2C_I2C \
		MOUSE_ELAN_I2C_SMBUS MOUSE_PS2 MOUSE_SYNAPTICS_I2C MOUSE_SYNAPTICS_USB MOUSE_SERIAL MOUSE_APPLETOUCH \
		MOUSE_BCM5974 MOUSE_CYAPA MOUSE_ELAN_I2C MOUSE_VSXXXAA MOUSE_GPIO USERIO

	if [ "$NODRIVERS" != "1" ]; then
		# Tablet support
		yconfig INPUT_TABLET TABLET_USB_ACECAD TABLET_USB_AIPTEK TABLET_USB_GTCO TABLET_USB_HANWANG TABLET_USB_KBTAB \
			TABLET_USB_PEGASUS TABLET_SERIAL_WACOM4

		# Joystick drivers
		yconfig INPUT_JOYSTICK JOYSTICK_XPAD_FF JOYSTICK_XPAD_LEDS JOYSTICK_PSXPAD_SPI_FF \
			JOYSTICK_ANALOG JOYSTICK_A3D JOYSTICK_ADI JOYSTICK_COBRA JOYSTICK_GF2K JOYSTICK_GRIP JOYSTICK_GRIP_MP \
			JOYSTICK_GUILLEMOT JOYSTICK_INTERACT JOYSTICK_SIDEWINDER JOYSTICK_TMDC JOYSTICK_IFORCE JOYSTICK_IFORCE_USB \
			JOYSTICK_IFORCE_232 JOYSTICK_WARRIOR JOYSTICK_MAGELLAN JOYSTICK_SPACEORB JOYSTICK_SPACEBALL JOYSTICK_STINGER \
			JOYSTICK_TWIDJOY JOYSTICK_ZHENHUA JOYSTICK_DB9 JOYSTICK_GAMECON JOYSTICK_TURBOGRAFX JOYSTICK_AS5011 JOYSTICK_JOYDUMP \
			JOYSTICK_XPAD JOYSTICK_WALKERA0701 JOYSTICK_PSXPAD_SPI JOYSTICK_PXRC

		# Touchscreen support
		yconfig INPUT_TOUCHSCREEN TOUCHSCREEN_PROPERTIES TOUCHSCREEN_WM9705 TOUCHSCREEN_WM9712 TOUCHSCREEN_WM9713 \
			TOUCHSCREEN_USB_EGALAX TOUCHSCREEN_USB_PANJIT TOUCHSCREEN_USB_3M TOUCHSCREEN_USB_ITM TOUCHSCREEN_USB_ETURBO TOUCHSCREEN_USB_GUNZE \
			TOUCHSCREEN_USB_DMC_TSC10 TOUCHSCREEN_USB_IRTOUCH TOUCHSCREEN_USB_IDEALTEK TOUCHSCREEN_USB_GENERAL_TOUCH TOUCHSCREEN_USB_GOTOP \
			TOUCHSCREEN_USB_JASTEC TOUCHSCREEN_USB_ELO TOUCHSCREEN_USB_E2I TOUCHSCREEN_USB_ZYTRONIC TOUCHSCREEN_USB_ETT_TC45USB TOUCHSCREEN_USB_NEXIO \
			TOUCHSCREEN_USB_EASYTOUCH TOUCHSCREEN_TSC2007_IIO TOUCHSCREEN_88PM860X TOUCHSCREEN_ADS7846 TOUCHSCREEN_AD7877 TOUCHSCREEN_AD7879 \
			TOUCHSCREEN_AD7879_I2C TOUCHSCREEN_AD7879_SPI TOUCHSCREEN_ADC TOUCHSCREEN_AR1021_I2C TOUCHSCREEN_AUO_PIXCIR \
			TOUCHSCREEN_BU21013 TOUCHSCREEN_BU21029 TOUCHSCREEN_CHIPONE_ICN8318 OUCHSCREEN_CHIPONE_ICN8505 TOUCHSCREEN_CY8CTMG110 TOUCHSCREEN_CYTTSP_CORE \
			TOUCHSCREEN_CYTTSP_I2C TOUCHSCREEN_CYTTSP_SPI TOUCHSCREEN_CYTTSP4_CORE TOUCHSCREEN_CYTTSP4_I2C TOUCHSCREEN_CYTTSP4_SPI TOUCHSCREEN_DA9034 \
			TOUCHSCREEN_DA9052 TOUCHSCREEN_DYNAPRO TOUCHSCREEN_HAMPSHIRE TOUCHSCREEN_EETI TOUCHSCREEN_EGALAX TOUCHSCREEN_EGALAX_SERIAL \
			TOUCHSCREEN_EXC3000 TOUCHSCREEN_FUJITSU TOUCHSCREEN_ILI210X TOUCHSCREEN_S6SY761 TOUCHSCREEN_GUNZE TOUCHSCREEN_EKTF2127 TOUCHSCREEN_ELAN \
			TOUCHSCREEN_ELO TOUCHSCREEN_WACOM_W8001 TOUCHSCREEN_WACOM_I2C TOUCHSCREEN_MAX11801 TOUCHSCREEN_MCS5000 TOUCHSCREEN_MMS114 TOUCHSCREEN_MTOUCH \
			TOUCHSCREEN_IMX6UL_TSC TOUCHSCREEN_INEXIO TOUCHSCREEN_MK712 TOUCHSCREEN_PENMOUNT TOUCHSCREEN_EDT_FT5X06 TOUCHSCREEN_TOUCHRIGHT \
			TOUCHSCREEN_TOUCHWIN TOUCHSCREEN_TI_AM335X_TSC TOUCHSCREEN_UCB1400 TOUCHSCREEN_PIXCIR TOUCHSCREEN_WM831X TOUCHSCREEN_WM97XX \
			TOUCHSCREEN_USB_COMPOSITE TOUCHSCREEN_MC13783 TOUCHSCREEN_TOUCHIT213 TOUCHSCREEN_TSC_SERIO TOUCHSCREEN_TSC200X_CORE \
			TOUCHSCREEN_TSC2004 TOUCHSCREEN_TSC2005 TOUCHSCREEN_TSC2007 TOUCHSCREEN_PCAP TOUCHSCREEN_RM_TS TOUCHSCREEN_SILEAD \
			TOUCHSCREEN_SIS_I2C TOUCHSCREEN_ST1232 TOUCHSCREEN_STMFTS TOUCHSCREEN_STMPE TOUCHSCREEN_SUR40 TOUCHSCREEN_SURFACE3_SPI \
			TOUCHSCREEN_SX8654 TOUCHSCREEN_TPS6507X TOUCHSCREEN_ZET6223 TOUCHSCREEN_ZFORCE TOUCHSCREEN_COLIBRI_VF50
		mconfig TOUCHSCREEN_GOODIX TOUCHSCREEN_MELFAS_MIP4 TOUCHSCREEN_WDT87XX_I2C TOUCHSCREEN_HIDEEP TOUCHSCREEN_ATMEL_MXT_T37 TOUCHSCREEN_ATMEL_MXT \
			TOUCHSCREEN_IQS5XX TOUCHSCREEN_ROHM_BU21023

		# Misc input drivers
		yconfig INPUT_AD714X INPUT_AD714X_I2C INPUT_BMA150 INPUT_E3X0_BUTTON INPUT_PCSPKR INPUT_MC13783_PWRBUTTON \
			INPUT_MMA8450 INPUT_APANEL INPUT_GP2A INPUT_GPIO_BEEPER INPUT_GPIO_DECODER INPUT_ATLAS_BTNS INPUT_ATI_REMOTE2 \
			INPUT_KEYSPAN_REMOTE INPUT_KXTJ9 INPUT_POWERMATE INPUT_YEALINK INPUT_CM109 INPUT_REGULATOR_HAPTIC INPUT_RETU_PWRBUTTON \
			INPUT_UINPUT INPUT_PCF50633_PMU INPUT_PCF8574 INPUT_GPIO_ROTARY_ENCODER INPUT_ADXL34X INPUT_ADXL34X_I2C INPUT_IMS_PCU \
			INPUT_CMA3000 INPUT_CMA3000_I2C INPUT_IDEAPAD_SLIDEBAR INPUT_SOC_BUTTON_ARRAY INPUT_DRV260X_HAPTICS INPUT_DRV2665_HAPTICS \
			INPUT_DRV2667_HAPTICS INPUT_KXTJ9_POLLED_MODE
	fi

	# HID support
	yconfig HID HIDRAW UHID HID_GENERIC USB_HID HID_PID USB_HIDDEV NEW_LEDS LEDS_CLASS HID_ACRUX_FF DRAGONRISE_FF HOLTEK_FF LOGITECH_FF \
		LOGIRUMBLEPAD2_FF LOGIG940_FF LOGIWHEELS_FF PANTHERLORD_FF HID_PICOLCD_FB HID_PICOLCD_BACKLIGHT HID_PICOLCD_LCD HID_PICOLCD_LEDS \
		HID_PICOLCD_CIR SONY_FF GREENASIA_FF SMARTJOYPLUS_FF THRUSTMASTER_FF ZEROPLUS_FF I2C_HID HID_A4TECH HID_ACCUTOUCH HID_ACRUX \
		HID_APPLE HID_APPLEIR HID_ASUS HID_AUREAL HID_BELKIN HID_BETOP_FF HID_BIGBEN_FF HID_CHERRY HID_CHICONY HID_CORSAIR HID_COUGAR \
		HID_MACALLY HID_PRODIKEYS HID_CMEDIA HID_CP2112 HID_CREATIVE_SB0540 HID_CYPRESS HID_DRAGONRISE HID_EMS_FF HID_ELAN HID_ELECOM \
		HID_ELO HID_EZKEY HID_GEMBIRD HID_GFRM HID_HOLTEK HID_GOOGLE_HAMMER HID_GT683R HID_KEYTOUCH HID_KYE HID_UCLOGIC HID_WALTOP \
		HID_VIEWSONIC HID_GYRATION HID_ICADE HID_ITE HID_JABRA HID_TWINHAN HID_KENSINGTON HID_LCPOWER HID_LED HID_LENOVO HID_LOGITECH \
		HID_LOGITECH_DJ HID_LOGITECH_HIDPP HID_MAGICMOUSE HID_MALTRON HID_MAYFLASH HID_REDRAGON HID_MICROSOFT HID_MONTEREY HID_MULTITOUCH \
		HID_NTI HID_NTRIG HID_ORTEK HID_PANTHERLORD HID_PENMOUNT HID_PETALYNX HID_PICOLCD HID_PLANTRONICS HID_PRIMAX HID_RETRODE HID_ROCCAT \
		HID_SAITEK HID_SAMSUNG HID_SONY HID_SPEEDLINK HID_STEAM HID_STEELSERIES HID_SUNPLUS HID_RMI HID_GREENASIA HID_HYPERV_MOUSE \
		HID_SMARTJOYPLUS HID_TIVO HID_TOPSEED HID_THINGM HID_THRUSTMASTER HID_UDRAW_PS3 HID_U2FZERO HID_WACOM HID_WIIMOTE HID_XINMO \
		HID_ZEROPLUS HID_ZYDACRON HID_SENSOR_HUB HID_ALPS
	nconfig HID_SENSOR_CUSTOM_SENSOR

	# Platform specific HID support
	case $arch in
		x86_64|i386)
			yconfig INTEL_ISH_HID
			;;
	esac

	if [ "$NODRIVERS" != "1" ]; then
		# misc i2c support
		yconfig I2C_ALGOBIT I2C_ALGOPCA I2C_ALGOPCF I2C_AMD756 I2C_AMD756_S4882 I2C_AMD8111 I2C_AMD_MP2 I2C_CHARDEV I2C_CHT_WC I2C_COMPAT \
			I2C_CROS_EC_TUNNEL I2C_DESIGNWARE_BAYTRAIL I2C_DESIGNWARE_CORE I2C_DESIGNWARE_PCI I2C_DESIGNWARE_PLATFORM I2C_DESIGNWARE_SLAVE \
			I2C_DIOLAN_U2C I2C_HELPER_AUTO I2C_HID_ACPI I2C_HID I2C_I801 I2C_ISCH I2C_ISMT I2C_MLXBF I2C_MLXCPLD I2C_MULTI_INSTANTIATE \
			I2C_MUX_GPMUX I2C_MUX_LTC4306 I2C_MUX I2C_MUX_MLXCPLD I2C_NFORCE2 I2C_NFORCE2_S4985 I2C_NVIDIA_GPU I2C_PARPORT I2C_PCA_PLATFORM \
			I2C_PIIX4 I2C_PXA I2C_SCMI I2C_SI470X I2C_SIMTEC I2C_SIS96X I2C_SLAVE_EEPROM I2C_SLAVE I2C_STUB I2C_TINY_USB I2C_VIA I2C_VIAPRO \
			I2C_VIPERBOARD I2C
		nconfig I2C_ALI1535 I2C_ALI1563 I2C_ALI15X3 I2C_ARB_GPIO_CHALLENGE I2C_CADENCE I2C_CBUS_GPIO I2C_DEBUG_ALGO I2C_DEBUG_BUS I2C_DEBUG_CORE \
			I2C_DEMUX_PINCTRL I2C_EG20T I2C_EMEV2 I2C_FSI I2C_GPIO I2C_HID_OF_GOODIX I2C_HID_OF I2C_MUX_GPIO I2C_MUX_PCA9541 I2C_MUX_PCA954x \
			I2C_MUX_PINCTRL I2C_MUX_REG I2C_OCORES I2C_PARPORT_LIGHT I2C_PXA_SLAVE I2C_QCOM_CCI I2C_RK3X I2C_ROBOTFUZZ_OSIF I2C_SI4713 \
			I2C_SIS5595 I2C_SIS630 I2C_SLAVE_TESTUNIT I2C_TAOS_EVM I2C_XILINX
	fi

	# Core networking support
	yconfig NETDEVICES MII NET_CORE BONDING EQUALIZER NET_FC IFB NET_TEAM NET_TEAM_MODE_BROADCAST NET_TEAM_MODE_ROUNDROBIN NET_TEAM_MODE_RANDOM \
		NET_TEAM_MODE_ACTIVEBACKUP NET_TEAM_MODE_LOADBALANCE MACVLAN MACVTAP IPVLAN_L3S IPVLAN IPVTAP VXLAN GENEVE BAREUDP GTP MACSEC \
		NETCONSOLE NETCONSOLE_DYNAMIC NETPOLL NET_POLL_CONTROLLER NTB_NETDEV TUN TAP VETH VIRTIO_NET NLMON NET_VRF VSOCKMON MHI_NET SUNGEM_PHY \
		RPACKET PACKET_DIAG UNIX UNIX_SCM UNIX_DIAG TLS TLS_DEVICE XFRM XFRM_OFFLOAD XFRM_ALGO XFRM_USER XFRM_INTERFACE XFRM_SUB_POLICY \
		XFRM_MIGRATE XFRM_STATISTICS XFRM_AH XFRM_ESP XFRM_IPCOMP NET_KEY NET_KEY_MIGRATE XFRM_ESPINTCP SMC SMC_DIAG XDP_SOCKETS XDP_SOCKETS_DIAG \
		INET IP_MULTICAST IP_ADVANCED_ROUTER IP_FIB_TRIE_STATS IP_MULTIPLE_TABLES IP_ROUTE_MULTIPATH IP_ROUTE_VERBOSE IP_ROUTE_CLASSID NET_IPIP \
		NET_IPGRE_DEMUX NET_IP_TUNNEL NET_IPGRE NET_IPGRE_BROADCAST IP_MROUTE_COMMON IP_MROUTE IP_MROUTE_MULTIPLE_TABLES IP_PIMSM_V1 IP_PIMSM_V2 \
		SYN_COOKIES NET_IPVTI NET_UDP_TUNNEL NET_FOU NET_FOU_IP_TUNNELS INET_AH INET_ESP INET_ESP_OFFLOAD INET_ESPINTCP INET_IPCOMP INET_XFRM_TUNNEL \
		INET_TUNNEL INET_DIAG INET_TCP_DIAG INET_UDP_DIAG INET_RAW_DIAG INET_DIAG_DESTROY TCP_CONG_ADVANCED TCP_CONG_BIC TCP_CONG_CUBIC TCP_CONG_WESTWOOD \
		TCP_CONG_HTCP TCP_CONG_HSTCP TCP_CONG_HYBLA TCP_CONG_VEGAS TCP_CONG_NV TCP_CONG_SCALABLE TCP_CONG_LP TCP_CONG_VENO TCP_CONG_YEAH TCP_CONG_ILLINOIS \
		TCP_CONG_DCTCP TCP_CONG_CDG TCP_CONG_BBR DEFAULT_CUBIC TCP_MD5SIG IPV6 IPV6_ROUTER_PREF IPV6_ROUTE_INFO IPV6_OPTIMISTIC_DAD INET6_AH INET6_ESP \
		INET6_ESP_OFFLOAD INET6_ESPINTCP INET6_IPCOMP IPV6_MIP6 IPV6_ILA INET6_XFRM_TUNNEL INET6_TUNNEL IPV6_VTI IPV6_SIT IPV6_SIT_6RD IPV6_NDISC_NODETYPE \
		IPV6_TUNNEL IPV6_GRE IPV6_FOU IPV6_FOU_TUNNEL IPV6_MULTIPLE_TABLES IPV6_SUBTREES IPV6_MROUTE IPV6_MROUTE_MULTIPLE_TABLES IPV6_PIMSM_V2 \
		IPV6_SEG6_LWTUNNEL IPV6_SEG6_HMAC IPV6_SEG6_BPF IPV6_RPL_LWTUNNEL NETLABEL MPTCP INET_MPTCP_DIAG MPTCP_IPV6 NETWORK_SECMARK NET_PTP_CLASSIFY \
		NETWORK_PHY_TIMESTAMPING NETFILTER NETFILTER_ADVANCED BRIDGE_NETFILTER NET_9P NET_9P_VIRTIO NET_9P_XEN NET_9P_RDMA TIPC TIPC_MEDIA_IB TIPC_MEDIA_UDP \
		TIPC_CRYPTO TIPC_DIAG ATM ATM_CLIP ATM_LANE ATM_MPOA ATM_BR2684 L2TP L2TP_DEBUGFS L2TP_V3 L2TP_IP L2TP_ETH STP GARP MRP BRIDGE BRIDGE_IGMP_SNOOPING \
		BRIDGE_VLAN_FILTERING BRIDGE_MRP BRIDGE_CFM HAVE_NET_DSA NET_DSA NET_DSA_TAG_8021Q NET_DSA_TAG_AR9331 NET_DSA_TAG_BRCM_COMMON NET_DSA_TAG_BRCM \
		NET_DSA_TAG_BRCM_PREPEND NET_DSA_TAG_HELLCREEK NET_DSA_TAG_GSWIP NET_DSA_TAG_DSA_COMMON NET_DSA_TAG_DSA NET_DSA_TAG_EDSA NET_DSA_TAG_MTK \
		NET_DSA_TAG_KSZ NET_DSA_TAG_RTL4_A NET_DSA_TAG_OCELOT NET_DSA_TAG_QCA NET_DSA_TAG_LAN9303 NET_DSA_TAG_SJA1105 NET_DSA_TAG_TRAILER VLAN_8021Q \
		VLAN_8021Q_GVRP VLAN_8021Q_MVRP LLC LLC2 ATALK DEV_APPLETALK IPDDP IPDDP_ENCAP PHONET 6LOWPAN 6LOWPAN_DEBUGFS 6LOWPAN_NHC 6LOWPAN_NHC_DEST \
		6LOWPAN_NHC_FRAGMENT 6LOWPAN_NHC_HOP 6LOWPAN_NHC_IPV6 6LOWPAN_NHC_MOBILITY 6LOWPAN_NHC_ROUTING 6LOWPAN_NHC_UDP 6LOWPAN_GHC_EXT_HDR_HOP \
		6LOWPAN_GHC_UDP 6LOWPAN_GHC_ICMPV6 6LOWPAN_GHC_EXT_HDR_DEST 6LOWPAN_GHC_EXT_HDR_FRAG 6LOWPAN_GHC_EXT_HDR_ROUTE IEEE802154 IEEE802154_NL802154_EXPERIMENTAL \
		IEEE802154_SOCKET IEEE802154_6LOWPAN MAC802154 NET_SCHED NET_SCH_CBQ NET_SCH_HTB NET_SCH_HFSC NET_SCH_ATM NET_SCH_PRIO NET_SCH_MULTIQ NET_SCH_RED \
		NET_SCH_SFB NET_SCH_SFQ NET_SCH_TEQL NET_SCH_TBF NET_SCH_CBS NET_SCH_ETF NET_SCH_TAPRIO NET_SCH_GRED NET_SCH_DSMARK NET_SCH_NETEM NET_SCH_DRR \
		NET_SCH_MQPRIO NET_SCH_SKBPRIO NET_SCH_CHOKE NET_SCH_QFQ NET_SCH_CODEL NET_SCH_FQ_CODEL NET_SCH_CAKE NET_SCH_FQ NET_SCH_HHF NET_SCH_PIE \
		NET_SCH_FQ_PIE NET_SCH_INGRESS NET_SCH_PLUG NET_SCH_ETS NET_SCH_DEFAULT DEFAULT_FQ_CODEL NET_CLS NET_CLS_BASIC NET_CLS_TCINDEX NET_CLS_ROUTE4 \
		NET_CLS_FW NET_CLS_U32 CLS_U32_PERF CLS_U32_MARK NET_CLS_RSVP NET_CLS_RSVP6 NET_CLS_FLOW NET_CLS_CGROUP NET_CLS_BPF NET_CLS_FLOWER \
		NET_CLS_MATCHALL NET_EMATCH NET_EMATCH_CMP NET_EMATCH_NBYTE NET_EMATCH_U32 NET_EMATCH_META NET_EMATCH_TEXT NET_EMATCH_CANID \
		NET_EMATCH_IPSET NET_EMATCH_IPT NET_CLS_ACT NET_ACT_POLICE NET_ACT_GACT GACT_PROB NET_ACT_MIRRED NET_ACT_SAMPLE NET_ACT_IPT \
		NET_ACT_NAT NET_ACT_PEDIT NET_ACT_SIMP NET_ACT_SKBEDIT NET_ACT_CSUM NET_ACT_MPLS NET_ACT_VLAN NET_ACT_BPF NET_ACT_CONNMARK \
		NET_ACT_CTINFO NET_ACT_SKBMOD NET_ACT_IFE NET_ACT_TUNNEL_KEY NET_ACT_CT NET_ACT_GATE NET_IFE_SKBMARK NET_IFE_SKBPRIO \
		NET_IFE_SKBTCINDEX NET_TC_SKB_EXT NET_SCH_FIFO DCB DNS_RESOLVER BATMAN_ADV BATMAN_ADV_BATMAN_V BATMAN_ADV_BLA BATMAN_ADV_DAT \
		BATMAN_ADV_NC BATMAN_ADV_MCAST OPENVSWITCH OPENVSWITCH_GRE OPENVSWITCH_VXLAN OPENVSWITCH_GENEVE VSOCKETS VSOCKETS_DIAG \
		VSOCKETS_LOOPBACK VMWARE_VMCI_VSOCKETS VIRTIO_VSOCKETS VIRTIO_VSOCKETS_COMMON HYPERV_VSOCKETS NETLINK_DIAG MPLS NET_MPLS_GSO \
		MPLS_ROUTING MPLS_IPTUNNEL NET_NSH HSR NET_SWITCHDEV NET_L3_MASTER_DEV QRTR QRTR_SMD QRTR_TUN QRTR_MHI NET_NCSI NCSI_OEM_CMD_GET_MAC \
		RPS RFS_ACCEL XPS CGROUP_NET_PRIO CGROUP_NET_CLASSID NET_RX_BUSY_POLL BQL BPF_JIT BPF_STREAM_PARSER NET_FLOW_LIMIT WIREGUARD \
		PLIP PPP PPP_BSDCOMP PPP_DEFLATE PPP_FILTER PPP_MPPE PPP_MULTILINK PPPOATM PPPOE PPTP PPPOL2TP PPP_ASYNC PPP_SYNC_TTY \
		SLIP SLHC SLIP_COMPRESSED SLIP_SMART SLIP_MODE_SLIP6 CONFIG_NET_FAILOVER ISDN ISDN_CAPI CAPI_TRACE ISDN_CAPI_MIDDLEWARE \
		MISDN MISDN_DSP MISDN_L1OIP MISDN_HFCPCI MISDN_HFCMULTI MISDN_HFCUSB MISDN_AVMFRITZ MISDN_SPEEDFAX MISDN_INFINEON MISDN_W6692 \
		MISDN_NETJET MISDN_HDLC MISDN_IPAC MISDN_ISAR
	nconfig TLS_TOE XFRM_USER_COMPAT IP_PNP DEFAULT_RENO NET_9P_DEBUG IP_DCCP IP_SCTP RDS ATM_CLIP_NO_ICMP ATM_BR2684_IPFILTER DECNET \
		X25 LAPB DEFAULT_FQ DEFAULT_CODEL DEFAULT_FQ_PIE DEFAULT_SFQ DEFAULT_PFIFO_FAST BATMAN_ADV_DEBUG BATMAN_ADV_TRACING WIREGUARD_DEBUG \
		TUN_VNET_CROSS_LE
	varconfig NET_EMATCH_STACK 32
	strconfig DEFAULT_TCP_CONG "cubic"
	strconfig DEFAULT_NET_SCH "fq_codel"

	# Netfilter
	yconfig NETFILTER_INGRESS NETFILTER_NETLINK NETFILTER_FAMILY_BRIDGE NETFILTER_FAMILY_ARP NETFILTER_NETLINK_ACCT NETFILTER_NETLINK_QUEUE \
		NETFILTER_NETLINK_LOG NETFILTER_NETLINK_OSF NF_CONNTRACK NF_LOG_COMMON NF_LOG_NETDEV NETFILTER_CONNCOUNT NF_CONNTRACK_MARK NF_CONNTRACK_SECMARK \
		NF_CONNTRACK_ZONES NF_CONNTRACK_PROCFS NF_CONNTRACK_EVENTS NF_CONNTRACK_TIMEOUT NF_CONNTRACK_TIMESTAMP NF_CONNTRACK_LABELS NF_CT_PROTO_DCCP \
		NF_CT_PROTO_GRE NF_CT_PROTO_SCTP NF_CT_PROTO_UDPLITE NF_CONNTRACK_AMANDA NF_CONNTRACK_FTP NF_CONNTRACK_H323 NF_CONNTRACK_IRC NF_CONNTRACK_BROADCAST \
		NF_CONNTRACK_NETBIOS_NS NF_CONNTRACK_SNMP NF_CONNTRACK_PPTP NF_CONNTRACK_SANE NF_CONNTRACK_SIP NF_CONNTRACK_TFTP NF_CT_NETLINK NF_CT_NETLINK_TIMEOUT \
		NF_CT_NETLINK_HELPER NETFILTER_NETLINK_GLUE_CT NF_NAT NF_NAT_AMANDA NF_NAT_FTP NF_NAT_IRC NF_NAT_SIP NF_NAT_TFTP NF_NAT_REDIRECT NF_NAT_MASQUERADE \
		NETFILTER_SYNPROXY NF_TABLES NF_TABLES_INET NF_TABLES_NETDEV NFT_NUMGEN NFT_CT NFT_FLOW_OFFLOAD NFT_COUNTER NFT_CONNLIMIT NFT_LOG NFT_LIMIT NFT_MASQ \
		NFT_REDIR NFT_NAT NFT_TUNNEL NFT_OBJREF NFT_QUEUE NFT_QUOTA NFT_REJECT NFT_REJECT_INET NFT_COMPAT NFT_HASH NFT_FIB NFT_FIB_INET NFT_XFRM NFT_SOCKET \
		NFT_OSF NFT_TPROXY NFT_SYNPROXY NF_DUP_NETDEV NFT_DUP_NETDEV NFT_FWD_NETDEV NFT_FIB_NETDEV NFT_REJECT_NETDEV NF_FLOW_TABLE_INET NF_FLOW_TABLE \
		NETFILTER_XTABLES NETFILTER_XT_MARK NETFILTER_XT_CONNMARK NETFILTER_XT_SET NETFILTER_XT_TARGET_AUDIT NETFILTER_XT_TARGET_CHECKSUM NETFILTER_XT_TARGET_CLASSIFY \
		NETFILTER_XT_TARGET_CONNMARK NETFILTER_XT_TARGET_CONNSECMARK NETFILTER_XT_TARGET_CT NETFILTER_XT_TARGET_DSCP NETFILTER_XT_TARGET_HL \
		NETFILTER_XT_TARGET_HMARK NETFILTER_XT_TARGET_IDLETIMER NETFILTER_XT_TARGET_LED NETFILTER_XT_TARGET_LOG NETFILTER_XT_TARGET_MARK \
		NETFILTER_XT_NAT NETFILTER_XT_TARGET_NETMAP NETFILTER_XT_TARGET_NFLOG NETFILTER_XT_TARGET_NFQUEUE NETFILTER_XT_TARGET_NOTRACK \
		NETFILTER_XT_TARGET_RATEEST NETFILTER_XT_TARGET_REDIRECT NETFILTER_XT_TARGET_MASQUERADE NETFILTER_XT_TARGET_TEE NETFILTER_XT_TARGET_TPROXY \
		NETFILTER_XT_TARGET_TRACE NETFILTER_XT_TARGET_SECMARK NETFILTER_XT_TARGET_TCPMSS NETFILTER_XT_TARGET_TCPOPTSTRIP NETFILTER_XT_MATCH_ADDRTYPE \
		NETFILTER_XT_MATCH_BPF NETFILTER_XT_MATCH_CGROUP NETFILTER_XT_MATCH_CLUSTER NETFILTER_XT_MATCH_COMMENT NETFILTER_XT_MATCH_CONNBYTES \
		NETFILTER_XT_MATCH_CONNLABEL NETFILTER_XT_MATCH_CONNLIMIT NETFILTER_XT_MATCH_CONNMARK NETFILTER_XT_MATCH_CONNTRACK NETFILTER_XT_MATCH_CPU \
		NETFILTER_XT_MATCH_DCCP NETFILTER_XT_MATCH_DEVGROUP NETFILTER_XT_MATCH_DSCP NETFILTER_XT_MATCH_ECN NETFILTER_XT_MATCH_ESP \
		NETFILTER_XT_MATCH_HASHLIMIT NETFILTER_XT_MATCH_HELPER NETFILTER_XT_MATCH_HL NETFILTER_XT_MATCH_IPCOMP NETFILTER_XT_MATCH_IPRANGE \
		NETFILTER_XT_MATCH_IPVS NETFILTER_XT_MATCH_L2TP NETFILTER_XT_MATCH_LENGTH NETFILTER_XT_MATCH_LIMIT NETFILTER_XT_MATCH_MAC NETFILTER_XT_MATCH_MARK \
		NETFILTER_XT_MATCH_MULTIPORT NETFILTER_XT_MATCH_NFACCT NETFILTER_XT_MATCH_OSF NETFILTER_XT_MATCH_OWNER NETFILTER_XT_MATCH_POLICY \
		NETFILTER_XT_MATCH_PHYSDEV NETFILTER_XT_MATCH_PKTTYPE NETFILTER_XT_MATCH_QUOTA NETFILTER_XT_MATCH_RATEEST NETFILTER_XT_MATCH_REALM \
		NETFILTER_XT_MATCH_RECENT NETFILTER_XT_MATCH_SCTP NETFILTER_XT_MATCH_SOCKET NETFILTER_XT_MATCH_STATE NETFILTER_XT_MATCH_STATISTIC \
		NETFILTER_XT_MATCH_STRING NETFILTER_XT_MATCH_TCPMSS NETFILTER_XT_MATCH_TIME NETFILTER_XT_MATCH_U32 IP_SET_BITMAP_IP IP_SET_BITMAP_IPMAC \
		IP_SET_BITMAP_PORT IP_SET_HASH_IP IP_SET_HASH_IPMARK IP_SET_HASH_IPPORT IP_SET_HASH_IPPORTIP IP_SET_HASH_IPPORTNET IP_SET_HASH_IPMAC \
		IP_SET_HASH_MAC IP_SET_HASH_NETPORTNET IP_SET_HASH_NET IP_SET_HASH_NETNET IP_SET_HASH_NETPORT IP_SET_HASH_NETIFACE IP_SET_LIST_SET IP_VS IP_VS_IPV6 \
		IP_SET IP_VS_PROTO_TCP IP_VS_PROTO_UDP IP_VS_PROTO_AH_ESP IP_VS_PROTO_ESP IP_VS_PROTO_AH IP_VS_PROTO_SCTP IP_VS_RR IP_VS_WRR IP_VS_LC IP_VS_WLC \
		IP_VS_FO IP_VS_OVF IP_VS_LBLC IP_VS_LBLCR IP_VS_DH IP_VS_SH IP_VS_MH IP_VS_SED IP_VS_NQ IP_VS_FTP IP_VS_NFCT IP_VS_PE_SIP NF_DEFRAG_IPV4 \
		NF_SOCKET_IPV4 NF_TPROXY_IPV4 NF_TABLES_IPV4 NFT_REJECT_IPV4 NFT_DUP_IPV4 NFT_FIB_IPV4 NF_TABLES_ARP NF_FLOW_TABLE_IPV4 NF_DUP_IPV4 \
		NF_LOG_ARP NF_LOG_IPV4 NF_REJECT_IPV4 NF_NAT_SNMP_BASIC NF_NAT_PPTP NF_NAT_H323 IP_NF_IPTABLES IP_NF_MATCH_AH IP_NF_MATCH_ECN \
		IP_NF_MATCH_RPFILTER IP_NF_MATCH_TTL IP_NF_FILTER IP_NF_TARGET_REJECT IP_NF_TARGET_SYNPROXY IP_NF_NAT IP_NF_TARGET_MASQUERADE \
		IP_NF_TARGET_NETMAP IP_NF_TARGET_REDIRECT IP_NF_MANGLE IP_NF_TARGET_CLUSTERIP IP_NF_TARGET_ECN IP_NF_TARGET_TTL IP_NF_RAW IP_NF_SECURITY \
		IP_NF_ARPTABLES IP_NF_ARPFILTER IP_NF_ARP_MANGLE NF_SOCKET_IPV6 NF_TPROXY_IPV6 NF_TABLES_IPV6 NFT_REJECT_IPV6 NFT_DUP_IPV6 NFT_FIB_IPV6 \
		NF_FLOW_TABLE_IPV6 NF_DUP_IPV6 NF_REJECT_IPV6 NF_LOG_IPV6 IP6_NF_IPTABLES IP6_NF_MATCH_AH IP6_NF_MATCH_EUI64 IP6_NF_MATCH_FRAG \
		IP6_NF_MATCH_OPTS IP6_NF_MATCH_HL IP6_NF_MATCH_IPV6HEADER IP6_NF_MATCH_MH IP6_NF_MATCH_RPFILTER IP6_NF_MATCH_RT IP6_NF_MATCH_SRH \
		IP6_NF_TARGET_HL IP6_NF_FILTER IP6_NF_TARGET_REJECT IP6_NF_TARGET_SYNPROXY IP6_NF_MANGLE IP6_NF_RAW IP6_NF_SECURITY IP6_NF_NAT \
		IP6_NF_TARGET_MASQUERADE IP6_NF_TARGET_NPT NF_DEFRAG_IPV6 NF_TABLES_BRIDGE NFT_BRIDGE_META NFT_BRIDGE_REJECT NF_LOG_BRIDGE \
		NF_CONNTRACK_BRIDGE BRIDGE_NF_EBTABLES BRIDGE_EBT_BROUTE BRIDGE_EBT_T_FILTER BRIDGE_EBT_T_NAT BRIDGE_EBT_802_3 BRIDGE_EBT_AMONG \
		BRIDGE_EBT_ARP BRIDGE_EBT_IP BRIDGE_EBT_IP6 BRIDGE_EBT_LIMIT BRIDGE_EBT_MARK BRIDGE_EBT_PKTTYPE BRIDGE_EBT_STP BRIDGE_EBT_VLAN \
		BRIDGE_EBT_ARPREPLY BRIDGE_EBT_DNAT BRIDGE_EBT_MARK_T BRIDGE_EBT_REDIRECT BRIDGE_EBT_SNAT BRIDGE_EBT_LOG BRIDGE_EBT_NFLOG BPFILTER
	nconfig IP_VS_DEBUG
	varconfig IP_SET_MAX 256
	varconfig IP_VS_TAB_BITS 15
	varconfig IP_VS_SH_TAB_BITS 8
	varconfig IP_VS_MH_TAB_INDEX 12

	if [ "$NODRIVERS" != "1" ]; then
		# Infiniband support
		yconfig INFINIBAND_ADDR_TRANS INFINIBAND_IPOIB_CM INFINIBAND_IPOIB_DEBUG_DATA INFINIBAND_ON_DEMAND_PAGING \
			INFINIBAND_IPOIB_DEBUG INFINIBAND_QIB_DCA
		mconfig INFINIBAND_BNXT_RE INFINIBAND_CXGB4 INFINIBAND_EFA INFINIBAND_HFI1 INFINIBAND_I40IW \
			INFINIBAND_IPOIB INFINIBAND_ISER INFINIBAND_ISERT INFINIBAND INFINIBAND_MTHCA INFINIBAND_OCRDMA INFINIBAND_OPA_VNIC \
			INFINIBAND_QEDR INFINIBAND_QIB INFINIBAND_RDMAVT INFINIBAND_RTRS_CLIENT INFINIBAND_RTRS_SERVER \
			INFINIBAND_SRP INFINIBAND_SRPT INFINIBAND_USER_ACCESS INFINIBAND_USER_MAD INFINIBAND_USNIC \
			INFINIBAND_VMWARE_PVRDMA
		nconfig INFINIBAND_EXP_LEGACY_VERBS_NEW_UAPI

		# PHY drivers
		yconfig AMD_PHY ADIN_PHY AQUANTIA_PHY AX88796B_PHY BROADCOM_PHY BCM54140_PHY BCM7XXX_PHY BCM84881_PHY BCM87XX_PHY BCM_NET_PHYLIB \
			CICADA_PHY CORTINA_PHY DAVICOM_PHY ICPLUS_PHY LXT_PHY INTEL_XWAY_PHY LSI_ET1011C_PHY MARVELL_PHY MARVELL_10G_PHY MICREL_PHY \
			MICROCHIP_PHY MICROCHIP_T1_PHY MICROSEMI_PHY NATIONAL_PHY NXP_TJA11XX_PHY AT803X_PHY QSEMI_PHY REALTEK_PHY RENESAS_PHY SMSC_PHY \
			STE10XP TERANETICS_PHY DP83822_PHY DP83TC811_PHY DP83848_PHY DP83867_PHY DP83869_PHY VITESSE_PHY XILINX_GMII2RGMII \
			MICREL_KS8995MA MDIO_DEVICE MDIO_BUS MDIO_DEVRES MDIO_BITBANG MDIO_BCM_UNIMAC MDIO_CAVIUM MDIO_GPIO MDIO_I2C MDIO_MVUSB \
			MDIO_MSCC_MIIM MDIO_THUNDER

		# Networking networking drivers
		yconfig ETHERNET MDIO NET_VENDOR_ADAPTEC NET_VENDOR_AMAZON NET_VENDOR_AMD AMD_XGBE_DCB AMD_XGBE_HAVE_ECC NET_VENDOR_ARC \
			NET_VENDOR_ATHEROS NET_VENDOR_BROADCOM B44_PCI_AUTOSELECT B44_PCICORE_AUTOSELECT B44_PCI TIGON3_HWMON BNX2X_SRIOV BNXT_SRIOV \
			BNXT_FLOWER_OFFLOAD BNXT_DCB BNXT_HWMON NET_VENDOR_CAVIUM NET_VENDOR_CHELSIO CHELSIO_T1_1G CHELSIO_T4_DCB CHELSIO_T4_FCOE \
			CHELSIO_INLINE_CRYPTO NET_VENDOR_CISCO NET_VENDOR_DLINK NET_VENDOR_EMULEX BE2NET_HWMON BE2NET_BE2 BE2NET_BE3 BE2NET_LANCER \
			BE2NET_SKYHAWK NET_VENDOR_EZCHIP NET_VENDOR_GOOGLE NET_VENDOR_HUAWEI NET_VENDOR_I825XX NET_VENDOR_INTEL \
			E1000E_HWTS IGB_HWMON IGB_DCA IXGBE_HWMON IXGBE_DCA IXGBE_DCB IXGBEVF_IPSEC I40E_DCB NET_VENDOR_MARVELL SKGE_GENESIS \
			NET_VENDOR_MELLANOX MLX4_EN_DCB MLX4_DEBUG MLX4_CORE_GEN2 MLX5_ACCEL MLX5_FPGA MLX5_CORE_EN MLX5_EN_ARFS MLX5_EN_RXNFC \
			MLX5_MPFS MLX5_ESWITCH MLX5_CLS_ACT MLX5_TC_CT MLX5_CORE_EN_DCB MLX5_CORE_IPOIB MLX5_FPGA_IPSEC MLX5_IPSEC MLX5_EN_IPSEC \
			MLX5_FPGA_TLS MLX5_TLS MLX5_EN_TLS MLX5_SW_STEERING MLXSW_CORE_HWMON MLXSW_CORE_THERMAL MLXSW_SPECTRUM_DCB NET_VENDOR_MICROSEMI \
			NET_VENDOR_MYRI MYRI10GE_DCA NET_VENDOR_NATSEMI NET_VENDOR_NETERION NET_VENDOR_NETRONOME NFP_APP_FLOWER NFP_APP_ABM_NIC \
			NET_VENDOR_NI NET_VENDOR_8390 NET_VENDOR_NVIDIA NET_VENDOR_OKI NET_VENDOR_PACKET_ENGINES NET_VENDOR_PENSANDO NET_VENDOR_QLOGIC \
			QLCNIC_SRIOV QLCNIC_DCB QLCNIC_HWMON QED_LL2 QED_SRIOV QED_RDMA QED_ISCSI QED_FCOE QED_OOO NET_VENDOR_QUALCOMM NET_VENDOR_REALTEK \
			8139TOO_TUNE_TWISTER 8139TOO_8129 NET_VENDOR_RENESAS NET_VENDOR_ROCKER NET_VENDOR_SAMSUNG NET_VENDOR_SEEQ NET_VENDOR_SOLARFLARE \
			SFC_MTD SFC_MCDI_MON SFC_SRIOV SFC_MCDI_LOGGING SFC_FALCON_MTD NET_VENDOR_SILAN NET_VENDOR_SIS NET_VENDOR_SMSC NET_VENDOR_SOCIONEXT \
			NET_VENDOR_STMICRO NET_VENDOR_SUN NET_VENDOR_SYNOPSYS NET_VENDOR_TEHUTI NET_VENDOR_TI NET_VENDOR_VIA VIA_RHINE_MMIO NET_VENDOR_WIZNET \
			WIZNET_BUS_ANY NET_VENDOR_XILINX DEFXX_MMIO SWPHY LED_TRIGGER_PHY
		mconfig VORTEX TYPHOON ADAPTEC_STARFIRE ENA_ETHERNET AMD8111_ETH PCNET32 AMD_XGBE ATL2 ATL1 ATL1E ATL1C ALX B44 BCMGENET BNX2 CNIC TIGON3 \
			BNX2X SYSTEMPORT BNXT THUNDER_NIC_PF THUNDER_NIC_VF THUNDER_NIC_BGX THUNDER_NIC_RGX CAVIUM_PTP LIQUIDIO LIQUIDIO_VF CHELSIO_T1 \
			CHELSIO_T3 CHELSIO_T4 CHELSIO_T4VF CHELSIO_LIB CHELSIO_IPSEC_INLINE CHELSIO_TLS_DEVICE ENIC DL2K SUNDANCE BE2NET GVE HINIC E100 \
			E1000 E1000E IGB IGBVF IXGB IXGBE IXGBEVF I40E IAVF I40EVF ICE FM10K IGC JME MVMDIO SKGE SKY2 PRESTERA PRESTERA_PCI MLX4_EN \
			MLX4_CORE MLX5_CORE MLXSW_CORE MLXSW_PCI MLXSW_I2C MLXSW_SWITCHIB MLXSW_SWITCHX2 MLXSW_SPECTRUM MLXSW_MINIMAL MLXFW MSCC_OCELOT_SWITCH_LIB \
			MYRI10GE FEALNX NATSEMI NS83820 S2IO VXGE NFP NI_XGE_MANAGEMENT_ENET NE2K_PCI FORCEDETH ETHOC HAMACHI YELLOWFIN IONIC QLA3XXX \
			QLCNIC NETXEN_NIC QED QEDE QCOM_EMAC RMNET ATP 8139CP 8139TOO R8169 ROCKER SXGBE_ETH SFC SFC_FALCON SC92031 SIS900 SIS190 \
			EPIC100 SMSC911X SMSC9420 STMMAC_ETH STMMAC_PLATFORM DWMAC_GENERIC DWMAC_INTEL STMMAC_PCI HAPPYMEAL SUNGEM CASSINI NIU \
			DWC_XLGMAC DWC_XLGMAC_PCI TEHUTI TLAN VIA_RHINE VIA_VELOCITY WIZNET_W5100 WIZNET_W5300 WIZNET_W5100_SPI XILINX_AXI_EMAC \
			XILINX_LL_TEMAC FDDI DEFXX SKFP NET_SB1000 PHYLINK PHYLIB FIXED_PHY SFP
		nconfig SUNDANCE_MMIO IXGBE_IPSEC SKGE_DEBUG SKY2_DEBUG VXGE_DEBUG_TRACE_ALL NFP_DEBUG 8139TOO_PIO 8139_OLD_RX_RESET STMMAC_SELFTESTS \
			TI_CPSW_PHY_SEL WIZNET_BUS_DIRECT WIZNET_BUS_INDIRECT HIPPI
	fi

	# Core wireless networking support
	yconfig WIRELESS WIRELESS_EXT WEXT_CORE WEXT_PROC WEXT_SPY WEXT_PRIV CFG80211_REQUIRE_SIGNED_REGDB CFG80211_USE_KERNEL_REGDB_KEYS \
		CFG80211_DEFAULT_PS CFG80211_DEBUGFS CFG80211_CRDA_SUPPORT CFG80211_WEXT CFG80211_WEXT_EXPORT MAC80211_HAS_RC MAC80211_RC_MINSTREL \
		MAC80211_RC_DEFAULT_MINSTREL MAC80211_MESH MAC80211_LEDS MAC80211_DEBUGFS RFKILL_LEDS RFKILL_INPUT
	mconfig CFG80211 LIB80211 LIB80211_CRYPT_WEP LIB80211_CRYPT_CCMP LIB80211_CRYPT_TKIP MAC80211 RFKILL RFKILL_GPIO
	nconfig NL80211_TESTMODE CFG80211_DEVELOPER_WARNINGS MAC80211_MESSAGE_TRACING MAC80211_DEBUG_MENU LIB80211_DEBUG
	varconfig MAC80211_STA_HASH_MAX_SIZE 0
	strconfig MAC80211_RC_DEFAULT "minstrel_ht"

	if [ "$NODRIVERS" != "1" ]; then
		# Wireless networking drivers
		yconfig WLAN WLAN_VENDOR_ADMTEK WLAN_VENDOR_ATH ATH5K_DEBUG ATH5K_TRACER ATH5K_PCI ATH9K_COMMON_DEBUG ATH9K_BTCOEX_SUPPORT ATH9K_PCI \
			ATH9K_AHB ATH9K_DEBUGFS ATH9K_STATION_STATISTICS ATH9K_DYNACK ATH9K_WOW ATH9K_RFKILL ATH9K_CHANNEL_CONTEXT ATH9K_PCOEM ATH9K_HTC_DEBUGFS \
			ATH9K_HWRNG ATH9K_COMMON_SPECTRAL CARL9170_LEDS CARL9170_DEBUGFS CARL9170_WPC ATH6KL_DEBUG ATH6KL_TRACING WIL6210_ISR_COR WIL6210_TRACING \
			WIL6210_DEBUGFS ATH10K_CE ATH10K_DEBUG ATH10K_DEBUGFS ATH10K_SPECTRAL ATH10K_TRACING WCN36XX_DEBUGFS ATH11K_DEBUG ATH11K_DEBUGFS ATH11K_SPECTRAL \
			WLAN_VENDOR_BROADCOM B43_BCMA B43_SSB B43_BUSES_BCMA_AND_SSB B43_PCI_AUTOSELECT B43_PCICORE_AUTOSELECT B43_SDIO B43_BCMA_PIO B43_PIO B43_PHY_G \
			B43_PHY_N B43_PHY_LP B43_PHY_HT B43_LEDS B43_HWRNG B43LEGACY_PCI_AUTOSELECT B43LEGACY_PCICORE_AUTOSELECT B43LEGACY_LEDS B43LEGACY_HWRNG \
			B43LEGACY_DEBUG B43LEGACY_DMA B43LEGACY_PIO B43LEGACY_DMA_AND_PIO_MODE BRCMFMAC_PROTO_BCDC BRCMFMAC_PROTO_MSGBUF BRCMFMAC_SDIO BRCMFMAC_USB \
			BRCMFMAC_PCIE BRCM_TRACING BRCMDBG WLAN_VENDOR_CISCO WLAN_VENDOR_INTEL IPW2100_MONITOR IPW2200_MONITOR IPW2200_RADIOTAP IPW2200_PROMISCUOUS \
			IPW2200_QOS IWLWIFI_LEDS IWLWIFI_OPMODE_MODULAR WLAN_VENDOR_INTERSIL HOSTAP_FIRMWARE HOSTAP_FIRMWARE_NVRAM HERMES_PRISM HERMES_CACHE_FW_ON_INIT \
			P54_LEDS WLAN_VENDOR_MARVELL LIBERTAS_MESH WLAN_VENDOR_MEDIATEK MT76_LEDS WLAN_VENDOR_MICROCHIP WLAN_VENDOR_RALINK RT2800PCI_RT33XX RT2800PCI_RT35XX \
			RT2800PCI_RT53XX RT2800PCI_RT3290 RT2800USB_RT33XX RT2800USB_RT35XX RT2800USB_RT3573 RT2800USB_RT53XX RT2800USB_RT55XX RT2800USB_UNKNOWN \
			RT2X00_LIB_FIRMWARE RT2X00_LIB_CRYPTO RT2X00_LIB_LEDS RT2X00_LIB_DEBUGFS WLAN_VENDOR_REALTEK RTL8187_LEDS RTLWIFI_DEBUG RTL8XXXU_UNTESTED \
			RTW88_DEBUG RTW88_DEBUGFS WLAN_VENDOR_RSI RSI_DEBUGFS RSI_COEX WLAN_VENDOR_ST WLAN_VENDOR_TI WILINK_PLATFORM_DATA WLAN_VENDOR_ZYDAS WLAN_VENDOR_QUANTENNA
		mconfig ADM8211 ATH_COMMON ATH5K ATH9K_HW ATH9K_COMMON ATH9K ATH9K_PCI_NO_EEPROM ATH9K_HTC CARL9170 ATH6KL ATH6KL_SDIO ATH6KL_USB AR5523 \
			WIL6210 ATH10K ATH10K_PCI ATH10K_SDIO ATH10K_USB WCN36XX ATH11K ATH11K_AHB ATH11K_PCI B43 B43LEGACY BRCMUTIL BRCMSMAC BRCMFMAC AIRO \
			AIRO_CS IPW2100 IPW2200 LIBIPW IWLEGACY IWL4965 IWL3945 IWLWIFI IWLDVM IWLMVM HOSTAP HOSTAP_PLX HOSTAP_PCI HOSTAP_CS HERMES PLX_HERMES \
			TMD_HERMES NORTEL_HERMES ORINOCO_USB P54_COMMON P54_USB P54_PCI P54_SPI PRISM54 LIBERTAS LIBERTAS_USB LIBERTAS_CS LIBERTAS_SDIO LIBERTAS_SPI \
			LIBERTAS_THINFIRM LIBERTAS_THINFIRM_USB MWIFIEX MWIFIEX_SDIO MWIFIEX_PCIE MWIFIEX_USB MWL8K MT7601U MT76_CORE MT76_USB MT76_SDIO MT76x02_LIB \
			MT76x02_USB MT76x0_COMMON MT76x0U MT76x0E MT76x2_COMMON MT76x2E MT76x2U MT7603E MT7615_COMMON MT7615E MT7663_USB_SDIO_COMMON MT7663U MT7663S \
			MT7915E WILC1000 WILC1000_SDIO WILC1000_SPI RT2X00 RT2400PCI RT2500PCI RT61PCI RT2800PCI RT2500USB RT73USB RT2800USB RT2800_LIB RT2800_LIB_MMIO \
			RT2X00_LIB_MMIO RT2X00_LIB_PCI RT2X00_LIB_USB RT2X00_LIB RTL8180 RTL8187 RTL_CARDS RTL8192CE RTL8192SE RTL8192DE RTL8723AE RTL8723BE RTL8188EE \
			RTL8192EE RTL8821AE RTL8192CU RTLWIFI RTLWIFI_PCI RTLWIFI_USB RTL8192C_COMMON RTL8723_COMMON RTLBTCOEXIST RTL8XXXU RTW88 RTW88_CORE RTW88_PCI \
			RTW88_8822B RTW88_8822C RTW88_8723D RTW88_8821C RTW88_8822BE RTW88_8822CE RTW88_8723DE RTW88_8821CE RSI_91X RSI_SDIO RSI_USB CW1200 \
			CW1200_WLAN_SDIO CW1200_WLAN_SPI WL1251 WL1251_SPI WL1251_SDIO WL12XX WL18XX WLCORE WLCORE_SDIO USB_ZD1201 ZD1211RW QTNFMAC QTNFMAC_PCIE \
			MAC80211_HWSIM VIRT_WIFI IEEE802154_DRIVERS IEEE802154_FAKELB IEEE802154_AT86RF230 IEEE802154_MRF24J40 IEEE802154_CC2520 IEEE802154_ATUSB \
			IEEE802154_ADF7242 IEEE802154_CA8210 IEEE802154_MCR20A IEEE802154_HWSIM
		nconfig ATH_DEBUG CARL9170_HWRNG ATH11K_TRACING B43_BUSES_BCMA B43_BUSES_SSB B43_DEBUG B43LEGACY_DMA_MODE B43LEGACY_PIO_MODE IPW2100_DEBUG \
			IPW2200_DEBUG LIBIPW_DEBUG IWLWIFI_BCAST_FILTERING P54_SPI_DEFAULT_EEPROM LIBERTAS_DEBUG LIBERTAS_THINFIRM_DEBUG WILC1000_HW_OOB_INTR \
			RT2X00_DEBUG ZD1211RW_DEBUG WAN IEEE802154_AT86RF230_DEBUGFS IEEE802154_CA8210_DEBUGFS
	fi

	# Bluetooth support
	yconfig BT_BREDR BT_RFCOMM_TTY BT_BNEP_MC_FILTER BT_BNEP_PROTO_FILTER BT_LE BT_LEDS BT_MSFTEXT BT_DEBUGFS BT_HCIBTUSB_AUTOSUSPEND BT_HCIBTUSB_BCM \
		BT_HCIBTUSB_MTK BT_HCIBTUSB_RTL BT_HCIUART_SERDEV BT_HCIUART_H4 BT_HCIUART_BCSP BT_HCIUART_ATH3K BT_HCIUART_LL BT_HCIUART_3WIRE BT_HCIUART_INTEL \
		BT_HCIUART_BCM BT_HCIUART_RTL BT_HCIUART_QCA BT_HCIUART_AG6XX BT_HCIUART_MRVL
	mconfig BT BT_RFCOMM BT_BNEP BT_CMTP BT_HIDP BT_6LOWPAN BT_INTEL BT_BCM BT_RTL BT_QCA BT_HCIBTUSB BT_HCIBTSDIO BT_HCIUART BT_HCIUART_NOKIA \
		BT_HCIBCM203X BT_HCIBPA10X BT_HCIBFUSB BT_HCIDTL1 BT_HCIBT3C BT_HCIBLUECARD BT_HCIVHCI BT_MRVL BT_MRVL_SDIO BT_ATH3K BT_MTKSDIO BT_MTKUART \
		BT_HCIRS
	nconfig BT_HS

	# NFC support
	yconfig NFC_SHDLC
	mconfig NFC NFC_DIGITAL NFC_NCI NFC_NCI_SPI NFC_NCI_UART NFC_HCI NFC_TRF7970A NFC_MEI_PHY NFC_SIM NFC_PORT100 NFC_FDP NFC_FDP_I2C NFC_PN544 \
		NFC_PN544_I2C NFC_PN544_MEI NFC_PN533 NFC_PN533_USB NFC_PN533_I2C NFC_PN532_UART NFC_MICROREAD NFC_MICROREAD_I2C NFC_MICROREAD_MEI \
		NFC_MRVL NFC_MRVL_USB NFC_MRVL_UART NFC_MRVL_I2C NFC_MRVL_SPI NFC_ST21NFCA NFC_ST21NFCA_I2C NFC_ST_NCI NFC_ST_NCI_I2C NFC_ST_NCI_SPI \
		NFC_NXP_NCI NFC_NXP_NCI_I2C NFC_S3FWRN5 NFC_S3FWRN5_I2C NFC_S3FWRN82_UART NFC_ST95HF

	# Virtualization support
	yconfig VIRTIO_PCI VIRTIO_BALLOON VIRTIO_MMIO VIRTIO_CONSOLE IRQ_REMAP VFIO VFIO_PCI VFIO_PCI_VGA HYPERVISOR_GUEST \
		PARAVIRT PARAVIRT_SPINLOCKS PARAVIRT_GUEST CONNECTOR SCSI_FC_ATTRS VDPA VHOST_NET VHOST_SCSI VHOST_VSOCK VHOST
	mconfig KVM		

	# Platform specific virtualiztion
	case $arch in
		x86_64|i386)
			yconfig XEN_TMEM CLEANCACHE FRONTSWAP XEN_SELFBALLOONING X86_IO_APIC ACPI_PROCFS PCI_XEN XEN_PCIDEV_BACKEND \
				VIRTIO_MEM MD_IOMMU INTEL_IOMMU_FLOPPY_WA INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON INTEL_IOMMU_SVM INTEL_IOMMU \
				IOMMU_SUPPORT INTEL_IOMMU_DEFAULT_ON
			mconfig AMD_IOMMU_V2
			nconfig INTEL_IOMMU_DEBUGFS AMD_IOMMU_DEBUGFS
			;;
	esac

	if [ "$NODRIVERS" != "1" ]; then
		# Xen support
		yconfig XEN HVC_DRIVER HVC_XEN XEN_FBDEV_FRONTEND XEN_BLKDEV_FRONTEND \
			XEN_NETDEV_FRONTEND XEN_PCIDEV_FRONTEND INPUT_XEN_KBDDEV_FRONTEND XEN_FBDEV_FRONTEND \
			XEN_XENBUS_FRONTEND XEN_SAVE_RESTORE XEN_DOM0 XEN_DEV_EVTCHN XENFS XEN_COMPAT_XENFS \
			XEN_SYS_HYPERVISOR XEN_GNTDEV XEN_BACKEND XEN_NETDEV_BACKEND XEN_BALLOON XEN_SCRUB_PAGES \
			XEN_GRANT_DEV_ALLOC XEN_BLKDEV_BACKEND
	fi

	if [ "$NODRIVERS" = "1" ]; then
		# GPU support
		yconfig DRM_MIPI_DSI DRM_DP_AUX_CHARDEV DRM_KMS_FB_HELPER DRM_GEM_CMA_HELPER DRM_KMS_CMA_HELPER DRM_GEM_SHMEM_HELPER DRM_VM \
			DRM_PANEL DMABUF_MOVE_NOTIFY
		mconfig DRM DRM_SCHED DRM_MIPI_DBI DRM_KMS_HELPER DRM_TTM
		nconfig DEBUG_KERNEL_DC DRM_LEGACY
	else
		# GPU support
		yconfig DRM_MIPI_DSI DRM_DP_AUX_CHARDEV DRM_KMS_FB_HELPER DRM_GEM_CMA_HELPER DRM_KMS_CMA_HELPER DRM_GEM_SHMEM_HELPER DRM_VM \
			DRM_RADEON_USERPTR DRM_AMDGPU_SI DRM_AMDGPU_CIK DRM_AMDGPU_USERPTR DRM_AMD_DC DRM_AMD_DC_DCN1_0 DRM_AMD_DC_DCN2_0 \
			DRM_AMD_DC_DCN2_1 DRM_AMD_DC_DCN3_0 DRM_AMD_DC_DSC_SUPPORT DRM_AMD_ACP DRM_AMD_DC_HDCP HSA_AMD DRM_AMD_DC_SI \
			DRM_NOUVEAU_BACKLIGHT DRM_NOUVEAU_SVM DRM_PANEL DMABUF_MOVE_NOTIFY
		mconfig DRM DRM_SCHED DRM_MIPI_DBI DRM_KMS_HELPER DRM_TTM DRM_RADEON DRM_AMDGPU DRM_NOUVEAU DRM_VKMS DRM_QXL \
			DRM_VIRTIO_GPU DRM_CIRRUS_QEMU DRM_ETNAVIV
		nconfig DEBUG_KERNEL_DC DRM_LEGACY NOUVEAU_LEGACY_CTX_SUPPORT

		# Platform specific GPU support
		case $arch in
			x86_64|i386)
				yconfig DRM_I915_CAPTURE_ERROR DRM_I915_COMPRESS_ERROR \
					DRM_I915_USERPTR DRM_GMA600 DRM_GMA3600 DRM_VMWGFX_FBCON
				mconfig DRM_I915 DRM_VMWGFX DRM_GMA500
				strconfig DRM_I915_FORCE_PROBE "*"
				;;
		esac

		# Display panel support
		yconfig DRM_BRIDGE DRM_PANEL_BRIDGE DRM_DISPLAY_CONNECTOR
		mconfig DRM_PANEL_ARM_VERSATILE DRM_PANEL_LVDS DRM_PANEL_SIMPLE DRM_PANEL_ILITEK_IL9322 DRM_PANEL_INNOLUX_P079ZCA \
			DRM_PANEL_JDI_LT070ME05000 DRM_PANEL_SAMSUNG_LD9040 DRM_PANEL_LG_LG4573 DRM_PANEL_ORISETECH_OTM8009A \
			DRM_PANEL_PANASONIC_VVX10F034N00 DRM_PANEL_RASPBERRYPI_TOUCHSCREEN DRM_PANEL_RAYDIUM_RM68200 \
			DRM_PANEL_SAMSUNG_S6E3HA2 DRM_PANEL_SAMSUNG_S6E63J0X03 DRM_PANEL_SAMSUNG_S6E8AA0 DRM_PANEL_SEIKO_43WVF1G \
			DRM_PANEL_SHARP_LQ101R1SX01 DRM_PANEL_SHARP_LS043T1LE01 DRM_PANEL_SITRONIX_ST7789V \
			DRM_PANEL_SONY_ACX565AKM DRM_PANEL_TPO_TD028TTEC1 DRM_PANEL_TPO_TD043MTEA1 DRM_PANEL_SHARP_LS037V7DW01 \
			DRM_PANEL_RAYDIUM_RM67191 DRM_PANEL_LG_LB035Q02 DRM_PANEL_NEC_NL8048HL11 DRM_PARADE_PS8640 DRM_TI_TPD12S015 \
			DRM_PANEL_BOE_TV101WUM_NL6 DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 DRM_PANEL_LEADTEK_LTK050H3146W DRM_PANEL_VISIONOX_RM69299 \
			DRM_CHRONTEL_CH7033 DRM_PANEL_SAMSUNG_SOFEF00

		# Backlight, LCD and HDMI support
		yconfig LCD_CLASS_DEVICE LCD_L4F00242T03 LCD_LMS283GF05 LCD_LTV350QV LCD_ILI922X LCD_ILI9320 LCD_TDO24M LCD_VGG2432A4 LCD_PLATFORM \
			LCD_AMS369FG06 LCD_LMS501KF03 LCD_HX8357 LCD_OTM3225A BACKLIGHT_CLASS_DEVICE BACKLIGHT_KTD253 BACKLIGHT_LM3533 BACKLIGHT_PWM \
			BACKLIGHT_DA903X BACKLIGHT_DA9052 BACKLIGHT_MAX8925 BACKLIGHT_APPLE BACKLIGHT_QCOM_WLED BACKLIGHT_SAHARA BACKLIGHT_WM831X \
			BACKLIGHT_ADP5520 BACKLIGHT_ADP8860 BACKLIGHT_ADP8870 BACKLIGHT_88PM860X BACKLIGHT_PCF50633 BACKLIGHT_AAT2870 BACKLIGHT_LM3630A \
			BACKLIGHT_LM3639 BACKLIGHT_LP855X BACKLIGHT_LP8788 BACKLIGHT_PANDORA BACKLIGHT_SKY81452 BACKLIGHT_AS3711 BACKLIGHT_GPIO \
			BACKLIGHT_LV5207LP BACKLIGHT_BD6107 BACKLIGHT_ARCXCNN BACKLIGHT_RAVE_SP VIDEOMODE_HELPERS
	fi

	if [ "$NODRIVERS" != "1" ]; then
		# Sound support
		yconfig SND_AC97_POWER_SAVE SND_CS46XX_NEW_DSP SND_DESIGNWARE_PCM SND_DRIVERS SND_DYNAMIC_MINORS SND_ES1968_INPUT SND_ES1968_RADIO \
			SND_FM801_TEA575X_BOOL SND_HDA_CODEC_CA0132_DSP SND_HDA_HWDEP SND_HDA_I915 SND_HDA_INPUT_BEEP SND_HDA_INTEL_DETECT_DMIC \
			SND_HDA_INTEL_HDMI_SILENT_STREAM SND_HDA_PATCH_LOADER SND_HDA_RECONFIG SND_JACK SND_MAESTRO3_INPUT SND_OSSEMUL SND_PCI \
			SND_PCM_OSS_PLUGINS SND_SEQ_HRTIMER_DEFAULT SND_SOC_GENERIC_DMAENGINE_PCM SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC SND_SOC_INTEL_SST_TOPLEVEL \
			SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES SND_SOC_SOF_ALDERLAKE_SUPPORT SND_SOC_SOF_APOLLOLAKE_SUPPORT SND_SOC_SOF_BAYTRAIL_SUPPORT \
			SND_SOC_SOF_BROADWELL_SUPPORT SND_SOC_SOF_CANNONLAKE_SUPPORT SND_SOC_SOF_COFFEELAKE_SUPPORT SND_SOC_SOF_COMETLAKE_H_SUPPORT \
			SND_SOC_SOF_COMETLAKE_LP_SUPPORT SND_SOC_SOF_ELKHARTLAKE_SUPPORT SND_SOC_SOF_GEMINILAKE_SUPPORT SND_SOC_SOF_HDA_AUDIO_CODEC \
			SND_SOC_SOF_HDA_COMMON_HDMI_CODEC SND_SOC_SOF_HDA_LINK SND_SOC_SOF_ICELAKE_SUPPORT SND_SOC_SOF_INTEL_SOUNDWIRE_LINK SND_SOC_SOF_INTEL_TOPLEVEL \
			SND_SOC_SOF_JASPERLAKE_SUPPORT SND_SOC_SOF_MERRIFIELD_SUPPORT SND_SOC_SOF_TIGERLAKE_SUPPORT SND_SOC_SOF_TOPLEVEL SND_USB_CAIAQ_INPUT \
			SND_USB SND_VERBOSE_PROCFS SONY_FF SONYPI_COMPAT SOUND_OSS_CORE_PRECLAIM SOUNDWIRE
		mconfig SND_AD1889 SND_ALI5451 SND_ALOOP SND_ALS300 SND_ALS4000 SND_ASIHPI SND_ATIIXP SND_ATIIXP_MODEM SND_AU8810 SND_AU8820 SND_AU8830 SND_AZT3328 \
			SND_BCD2000 SND_BEBOB SND_BT87X SND_CA0106 SND_CMIPCI SND_COMPRESS_OFFLOAD SND_CS4281 SND_CS46XX SND_CS5530 SND_CS5535AUDIO SND_CTXFI \
			SND_DARLA20 SND_DARLA24 SND_DESIGNWARE_I2S SND_DICE SND_DMAENGINE_PCM SND_DUMMY SND_ECHO3G SND_EMU10K1 SND_EMU10K1X SND_ENS1370 SND_ENS1371 \
			SND_ES1938 SND_ES1968 SND_FM801 SND_GINA20 SND_GINA24 SND_HDA_CODEC_ANALOG SND_HDA_CODEC_CA0110 SND_HDA_CODEC_CA0132 SND_HDA_CODEC_CIRRUS \
			SND_HDA_CODEC_CMEDIA SND_HDA_CODEC_CONEXANT SND_HDA_CODEC_HDMI SND_HDA_CODEC_REALTEK SND_HDA_CODEC_SI3054 SND_HDA_CODEC_SIGMATEL SND_HDA_CODEC_VIA \
			SND_HDA_GENERIC SND_HDSP SND_HDSPM SND_HRTIMER SND_I2S_HI6210_I2S SND_ICE1712 SND_ICE1724 SND_INDIGODJ SND_INDIGODJX SND_INDIGOIO SND_INDIGOIOX \
			SND_INDIGO SND_INTEL8X0 SND_INTEL8X0M SND_ISIGHT SND_KORG1212 SND_LAYLA20 SND_LAYLA24 SND_LOLA SND_LX6464ES SND SND_MAESTRO3 SND_MESON_G12A_TOHDMITX \
			SND_MIA SND_MIXART SND_MIXER_OSS SND_MONA SND_MPU401 SND_MTPAV SND_MTS64 SND_NM256 SND_OXFW SND_OXYGEN SND_PCM_OSS SND_PCSP SND_PCXHR \
			SND_PORTMAN2X4 SND_RIPTIDE SND_RME32 SND_RME9652 SND_RME96 SND_SEQ_DUMMY SND_SEQUENCER SND_SEQUENCER_OSS SND_SERIAL_U16550 SND_SIMPLE_CARD \
			SND_SIMPLE_CARD_UTILS SND_SIS7019 SND_SOC_AC97_CODEC SND_SOC_ADAU1761_I2C SND_SOC_ADAU1761_SPI SND_SOC_ADAU7002 SND_SOC_ADAU7118_HW \
			SND_SOC_ADAU7118_I2C SND_SOC_ADI_AXI_I2S SND_SOC_ADI_AXI_SPDIF SND_SOC_ADI SND_SOC_AK5558 SND_SOC_AMD_ACP3x SND_SOC_AMD_ACP \
			SND_SOC_AMD_CZ_DA7219MX98357_MACH SND_SOC_AMD_CZ_RT5645_MACH SND_SOC_AMD_RENOIR SND_SOC_AMD_RENOIR_MACH SND_SOC_BD28623 SND_SOC_CROS_EC_CODEC \
			SND_SOC_CS35L34 SND_SOC_CS35L35 SND_SOC_CS35L36 SND_SOC_CS4234 SND_SOC_CS42L42 SND_SOC_CS43130 SND_SOC_CX2072X SND_SOC_DMIC SND_SOC_ES7134 \
			SND_SOC_ES8316 SND_SOC_ES8328_I2C SND_SOC_ES8328 SND_SOC_ES8328_SPI SND_SOC_HDAC_HDA SND_SOC_HDAC_HDMI SND_SOC_HDMI_CODEC SND_SOC_INTEL_BDW_RT5650_MACH \
			SND_SOC_INTEL_BDW_RT5677_MACH SND_SOC_INTEL_BROADWELL_MACH SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH SND_SOC_INTEL_BXT_RT298_MACH \
			SND_SOC_INTEL_BYT_CHT_CX2072X_MACH SND_SOC_INTEL_BYT_CHT_DA7213_MACH SND_SOC_INTEL_BYT_CHT_ES8316_MACH SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH \
			SND_SOC_INTEL_BYTCR_RT5640_MACH SND_SOC_INTEL_BYTCR_RT5651_MACH SND_SOC_INTEL_CATPT SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH \
			SND_SOC_INTEL_CHT_BSW_NAU8824_MACH SND_SOC_INTEL_CHT_BSW_RT5645_MACH SND_SOC_INTEL_CHT_BSW_RT5672_MACH SND_SOC_INTEL_CML_H \
			SND_SOC_INTEL_CML_LP_DA7219_MAX98357A_MACH SND_SOC_INTEL_CML_LP SND_SOC_INTEL_EHL_RT5660_MACH SND_SOC_INTEL_GLK_DA7219_MAX98357A_MACH \
			SND_SOC_INTEL_HASWELL SND_SOC_INTEL_HASWELL_MACH SND_SOC_INTEL_KBL_DA7219_MAX98357A_MACH SND_SOC_INTEL_KBL_DA7219_MAX98927_MACH \
			SND_SOC_INTEL_KBL_RT5660_MACH SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH \
			SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH \
			SND_SOC_INTEL_SKL_RT286_MACH SND_SOC_INTEL_SKYLAKE SND_SOC_INTEL_SOF_CML_RT1011_RT5682_MACH SND_SOC_INTEL_SOF_DA7219_MAX98373_MACH \
			SND_SOC_INTEL_SOF_PCM512x_MACH SND_SOC_INTEL_SOF_RT5682_MACH SND_SOC_INTEL_SOF_WM8804_MACH SND_SOC_INTEL_SOUNDWIRE_SOF_MACH \
			SND_SOC_INTEL_SST_ACPI SND_SOC_INTEL_SST SND_SOC SND_SOC_MAX9759 SND_SOC_MAX98088 SND_SOC_MAX98373_I2C SND_SOC_MAX98373 \
			SND_SOC_MAX98373_SDW SND_SOC_MAX98390 SND_SOC_MAX9839 SND_SOC_MAX9867 SND_SOC_MAX98927 SND_SOC_NAU8540 SND_SOC_NAU8824 \
			SND_SOC_PCM1789_I2C SND_SOC_PCM186X_I2C SND_SOC_PCM186X_SPI SND_SOC_PCM3060_I2C SND_SOC_PCM3060_SPI SND_SOC_PCM512x_I2C \
			SND_SOC_RL6231 SND_SOC_RT1308_SDW SND_SOC_RT5659 SND_SOC_RT5660 SND_SOC_RT5682_SDW SND_SOC_RT700_SDW SND_SOC_RT711_SDW \
			SND_SOC_RT715_SDW SND_SOC_SAMSUNG_MIDAS_WM1811 SND_SOC_SIMPLE_AMPLIFIER SND_SOC_SIMPLE_MUX SND_SOC_SOF_ACPI SND_SOC_SOF_ALDERLAKE \
			SND_SOC_SOF_APOLLOLAKE SND_SOC_SOF_BAYTRAIL SND_SOC_SOF_BROADWELL SND_SOC_SOF_CANNONLAKE SND_SOC_SOF_COFFEELAKE \
			SND_SOC_SOF_COMETLAKE SND_SOC_SOF_ELKHARTLAKE SND_SOC_SOF_GEMINILAKE SND_SOC_SOF_ICELAKE SND_SOC_SOF_INTEL_SOUNDWIRE \
			SND_SOC_SOF_JASPERLAKE SND_SOC_SOF_MERRIFIELD SND_SOC_SOF_PCI SND_SOC_SOF_TIGERLAKE SND_SOC_SPDIF SND_SOC_SSM4567 \
			SND_SOC_TAS2562 SND_SOC_TAS2764 SND_SOC_TAS2770 SND_SOC_TAS6424 SND_SOC_TDA7419 SND_SOC_TEGRA210_I2S SND_SOC_TLV320ADCX140 \
			SND_SOC_TLV320AIC32X4_I2C SND_SOC_TLV320AIC32X4_SPI SND_SOC_TS3A227E SND_SOC_TSCS42XX SND_SOC_WM8524 SND_SOC_WM8804_I2C \
			SND_SOC_WM8804 SND_SOC_ZL38060 SND_SONICVIBES SND_SST_ATOM_HIFI2_PLATFORM_ACPI SND_SST_ATOM_HIFI2_PLATFORM \
			SND_SST_ATOM_HIFI2_PLATFORM_PCI SND_TRIDENT SND_USB_6FIRE SND_USB_AUDIO SND_USB_CAIAQ SND_USB_HIFACE SND_USB_PODHD \
			SND_USB_POD SND_USB_TONEPORT SND_USB_UA101 SND_USB_US122L SND_USB_USX2Y SND_USB_VARIAX SND_VIA82XX SND_VIA82XX_MODEM \
			SND_VIRMIDI SND_VIRTUOSO SND_VX222 SND_XEN_FRONTEND SND_YMFPCI SONY_LAPTOP SOUND SOUNDWIRE_CADENCE SOUNDWIRE_INTEL SND_HDA_INTEL
		nconfig SND_SOC_ALC5623 SND_SOC_AK4104 SND_SOC_AK4118 SND_SOC_AK4458 SND_SOC_AK4554 SND_SOC_AK4613 SND_SOC_AK4642 SND_SOC_AK5386 \
			SND_SOC_ADAU1372_I2C SND_SOC_ADAU1372_SPI SND_SOC_ADAU1701 SND_PCMCIA SND_INTEL_BYT_PREFER_SOF SND_JACK_INJECTION_DEBUG \
			SND_ATMEL_SOC SND_AUDIO_GRAPH_CARD SND_AW2 SND_BCM63XX_I2S_WHISTLER SND_BT87X_OVERCLOCK SND_CTL_VALIDATION SND_DEBUG SND_DEBUG_VERBOSE \
			SND_SOC_BT_SCO SND_SOC_CS35L32 SND_SOC_CS35L33 SND_SOC_CS4265 SND_SOC_CS4270 SND_SOC_CS4271_I2C SND_SOC_CS4271_SPI SND_SOC_CS42L51_I2C \
			SND_SOC_CS42L52 SND_SOC_CS42L56 SND_SOC_CS42L73 SND_SOC_CS42XX8_I2C SND_SOC_CS4341 SND_SOC_CS4349 SND_SOC_CS53L30 SND_SOC_ES7241 \
			SND_SOC_FSL_ASOC_CARD SND_SOC_FSL_ASRC SND_SOC_FSL_AUDMIX SND_SOC_FSL_ESAI SND_SOC_FSL_MICFIL SND_SOC_FSL_MQS SND_SOC_FSL_SAI \
			SND_SOC_FSL_SPDIF SND_SOC_FSL_SSI SND_SOC_FSL_XCVR SND_SOC_GTM601 SND_SOC_IMG SND_SOC_IMX_AUDMUX SND_SOC_IMX_ES8328 \
			SND_SOC_INNO_RK3036 SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH SND_SOC_LPASS_RX_MACRO SND_SOC_LPASS_TX_MACRO SND_SOC_LPASS_VA_MACRO \
			SND_SOC_LPASS_WSA_MACRO SND_SOC_MAX98504 SND_SOC_MAX9860 SND_SOC_MSM8916_WCD_ANALOG SND_SOC_MSM8916_WCD_DIGITAL SND_SOC_MT6351 \
			SND_SOC_MT6358 SND_SOC_MT6660 SND_SOC_MTK_BTCVSD SND_SOC_NAU8315 SND_SOC_NAU8810 SND_SOC_NAU8822 SND_SOC_PCM1681 SND_SOC_PCM179X_I2C \
			SND_SOC_PCM179X_SPI SND_SOC_PCM3168A_I2C SND_SOC_PCM3168A_SPI SND_SOC_PCM5102A SND_SOC_PCM512x_SPI SND_SOC_RK3328 SND_SOC_RT5616 \
			SND_SOC_RT5631 SND_SOC_SAMSUNG_ARIES_WM8994 SND_SOC_SC7180 SND_SOC_SGTL5000 SND_SOC_SIRF_AUDIO_CODEC SND_SOC_SM8250 SND_SOC_SOF_DEBUG \
			SND_SOC_SOF_DEBUG_PROBES SOUNDWIRE_QCOM SND_SOC_SOF_HDA_ALWAYS_ENABLE_DMI_L1 SND_SOC_SOF_NOCODEC SND_SOC_SOF_NOCODEC_SUPPORT SND_SOC_SOF_OF \
			SND_SOC_SOF_STRICT_ABI_CHECKS SND_SOC_SSM2305 SND_SOC_SSM2602_I2C SND_SOC_SSM2602_SPI SND_SOC_STA32X SND_SOC_STA350 SND_SOC_STI_SAS \
			SND_SOC_TAS2552 SND_SOC_TAS5086 SND_SOC_TAS571X SND_SOC_TAS5720 SND_SOC_TFA9879 SND_SOC_TLV320AIC23_I2C SND_SOC_TLV320AIC23_SPI \
			SND_SOC_TLV320AIC31XX SND_SOC_TLV320AIC3X SND_SOC_TPA6130A2 SND_SOC_TSCS454 SND_SOC_UDA1334 SND_SOC_WM8510 SND_SOC_WM8523 \
			SND_SOC_WM8580 SND_SOC_WM8711 SND_SOC_WM8728 SND_SOC_WM8731 SND_SOC_WM8737 SND_SOC_WM8741 SND_SOC_WM8750 SND_SOC_WM8753 \
			SND_SOC_WM8770 SND_SOC_WM8776 SND_SOC_WM8782 SND_SOC_WM8804_SPI SND_SOC_WM8903 SND_SOC_WM8904 SND_SOC_WM8960 SND_SOC_WM8962 \
			SND_SOC_WM8974 SND_SOC_WM8978 SND_SOC_WM8985 SND_SOC_WSA881X SND_SOC_XILINX_AUDIO_FORMATTER SND_SOC_XILINX_I2S SND_SOC_XILINX_SPDIF \
			SND_SOC_XTFPGA_I2S SND_SOC_ZX_AUD96P22 SND_SPI SND_SUPPORT_OLD_API SND_VERBOSE_PRINTK SOC_TI SONYPI
		varconfig SND_AC97_POWER_SAVE_DEFAULT 0
		varconfig SND_HDA_INPUT_BEEP_MODE 0
		varconfig SND_HDA_PREALLOC_SIZE 0
		varconfig SND_MAX_CARDS 32

		# Web camera support
		yconfig USB_VIDEO_CLASS_INPUT_EVDEV USB_PWC_INPUT_EVDEV USB_VIDEO_CLASS USB_GSPCA USB_M5602 USB_STV06XX USB_GL860 \
			USB_GSPCA_BENQ USB_GSPCA_CONEX USB_GSPCA_CPIA1 USB_GSPCA_DTCS033 USB_GSPCA_ETOMS USB_GSPCA_FINEPIX \
			USB_GSPCA_JEILINJ USB_GSPCA_JL2005BCD USB_GSPCA_KINECT USB_GSPCA_KONICA USB_GSPCA_MARS USB_GSPCA_MR97310A \
			USB_GSPCA_NW80X USB_GSPCA_OV519 USB_GSPCA_OV534 USB_GSPCA_OV534_9 USB_GSPCA_PAC207 USB_GSPCA_PAC7302 \
			USB_GSPCA_PAC7311 USB_GSPCA_SE401 USB_GSPCA_SN9C2028 USB_GSPCA_SN9C20X USB_GSPCA_SONIXB USB_GSPCA_SONIXJ \
			USB_GSPCA_SPCA500 USB_GSPCA_SPCA501 USB_GSPCA_SPCA505 USB_GSPCA_SPCA506 USB_GSPCA_SPCA508 USB_GSPCA_SPCA561 \
			USB_GSPCA_SPCA1528 USB_GSPCA_SQ905 USB_GSPCA_SQ905C USB_GSPCA_SQ930X USB_GSPCA_STK014 USB_GSPCA_STK1135 \
			USB_GSPCA_STV0680 USB_GSPCA_SUNPLUS USB_GSPCA_T613 USB_GSPCA_TOPRO USB_GSPCA_TOUPTEK USB_GSPCA_TV8532 \
			USB_GSPCA_VC032X USB_GSPCA_VICAM USB_GSPCA_XIRLINK_CIT USB_GSPCA_ZC3XX USB_PWC \
			VIDEO_CPIA2 USB_ZR364XX USB_STKWEBCAM USB_S2255 VIDEO_USBTV

		case $arch in
			x86_64|i386)
				# Charges support
				yconfig W1_CON POWER_AVS POWER_RESET PDA_POWER CHARGER_MANAGER W1 CHARGER_ADP5061 BATTERY_DS2780 BATTERY_DS2781 \
					BATTERY_DS2782 BATTERY_SBS CHARGER_SBS BATTERY_BQ27XXX BATTERY_MAX17040 BATTERY_MAX17042 CHARGER_MAX8903 \
					CHARGER_LP8727 CHARGER_GPIO CHARGER_LTC365 CHARGER_BQ2415X CHARGER_BQ24257 CHARGER_BQ24735 CHARGER_BQ25890 \
					CHARGER_SMB347 BATTERY_GAUGE_LTC2941 CHARGER_RT9455
					;;
		esac
	fi

	# Security
	yconfig DEBUG_KERNEL DEBUG_RODATA DEBUG_SET_MODULE_RONX DEBUG_WX DEBUG_CREDENTIALS DEBUG_NOTIFIERS \
		DEBUG_LIST DEBUG_SG STRICT_KERNEL_RWX STRICT_MODULE_RWX STACKPROTECTOR STACKPROTECTOR_STRONG SYN_COOKIES \
		BUG_ON_DATA_CORRUPTION SCHED_STACK_END_CHECK SECURITY_YAMA HARDENED_USERCOPY SLAB_FREELIST_RANDOM \
		SLAB_FREELIST_HARDENED SLUB_DEBUG PAGE_POISONING PAGE_POISONING_ZERO INIT_ON_ALLOC_DEFAULT_ON \
		INIT_ON_FREE_DEFAULT_ON INIT_STACK_ALL INIT_STACK_ALL_ZERO VMAP_STACK REFCOUNT_FULL FORTIFY_SOURCE \
		SECURITY_DMESG_RESTRICT RESET_ATTACK_MITIGATION DEBUG_VIRTUAL SHUFFLE_PAGE_ALLOCATOR BPF_JIT_ALWAYS_ON \
		RETPOLINE ARCH_RANDOM TCG_TPM FORTIFY_SOURCE_STRICT_STRING SECURITY_LOCKDOWN_LSM SECURITY_LOCKDOWN_LSM_EARLY \
		LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY SECURITY_PERF_EVENTS_RESTRICT SECURITY_TIOCSTI_RESTRICT \
		PAGE_SANITIZE_VERIFY SLAB_SANITIZE_VERIFY SLUB_DEBUG_ON
	nconfig DEVMEM DEVKMEM DEVPORT LIVEPATCH KPROBES FTRACE HARDENED_USERCOPY_FALLBACK PAGE_POISONING_NO_SANITY \
		ACPI_CUSTOM_METHOD COMPAT_BRK PROC_KCORE COMPAT_VDSO KEXEC HIBERNATION INET_DIAG LEGACY_PTYS SECURITY_SELINUX_DISABLE \
		PROC_PAGE_MONITOR USELIB DEBUG_FS
	varconfig PANIC_TIMEOUT -1

	# Platform specific security
	case $arch in
		x86_64)
			yconfig RANDOMIZE_BASE RANDOMIZE_MEMORY LEGACY_VSYSCALL_NONE PAGE_TABLE_ISOLATION \
				X86_MCE X86_MCE_INTEL MTRR X86_PAT X86_SMAP _X86_UMIP X86_INTEL_MPX
			nconfig X86_MSR MODIFY_LDT_SYSCALL X86_VSYSCALL_EMULATION X86_INTEL_TSX_MODE_OFF \
				INTEL_TXT
			varconfig DEFAULT_MMAP_MIN_ADDR 65536
			;;
		i386)
			yconfig HIGHMEM64G X86_PAE RANDOMIZE_BASE RANDOMIZE_MEMORY LEGACY_VSYSCALL_NONE \
				PAGE_TABLE_ISOLATION X86_MCE X86_MCE_INTEL MTRR X86_PAT X86_SMAP _X86_UMIP X86_INTEL_MPX
			nconfig HIGHMEM4G X86_MSR MODIFY_LDT_SYSCALL X86_VSYSCALL_EMULATION X86_INTEL_TSX_MODE_OFF \
				INTEL_TXT
			varconfig DEFAULT_MMAP_MIN_ADDR 65536
			;;
		arm64)
			yconfig RANDOMIZE_BASE RANDOMIZE_MEMORY ARM64_SW_TTBR0_PAN UNMAP_KERNEL_AT_EL0
			varconfig DEFAULT_MMAP_MIN_ADDR 32768
			;;
		arm)
			yconfig CPU_SW_DOMAIN_PAN VMSPLIT_3G
			nconfig OABI_COMPAT
			varconfig DEFAULT_MMAP_MIN_ADDR 32768
			;;
	esac

	# Decrease surface attack
	nconfig BPF_SYSCALL SLAB_MERGE_DEFAULT LEGACY_VSYSCALL_NONE COREDUMP KSM SYSFS_SYSCALL \
		NOTIFIER_ERROR_INJECTION PROFILING PROC_PAGE_MONITOR LDISC_AUTOLOAD KALLSYMS \
		IKCONFIG IKHEADERS COMPAT_BRK LEGACY_VSYSCALL_NONE LEGACY_VSYSCALL_EMULATE LEGACY_VSYSCALL_XONLY \
		KEXEC KEXEC_FILE CRASH_DUMP TCP_SIMULT_CONNECT_DEFAULT_ON

	# Usability > security
	# Not disabled: ACPI_TABLE_UPGRADE BINFMT_MISC MAGIC_SYSRQ
}

main "$@"

